Connecting#

bfabricPy supports different authentication methods depending on your use case.

Choose Your Approach#

Use Case

Method

Documentation

Scripts, local tools, interactive sessions

bfabric-cli login once, then Bfabric.connect()

Interactive/Scripted Usage

Logging in from Python, without the CLI

Bfabric.connect_pkce() / Bfabric.connect_device_code()

Interactive/Scripted Usage

Non-interactive token

Bfabric.connect_pat()

Interactive/Scripted Usage

Background jobs, service accounts

Bfabric.connect_oauth()

Server/Webapp Usage

Webapps launched from B-Fabric

Bfabric.connect_token() / WebappClient.create()

Server/Webapp Usage

Next Steps#

After connecting, learn how to work with B-Fabric:

See Also#