login
Log into Modelbit.
If using API keys or running within a Modelbit Git repo, authentication is automatic. If not, this command prints a URL. Clicking the URL opens a browser tab that authenticates your Modelbit session
Returns a logged-in Modelbit object typically named mb
.
Parameters
mb = modelbit.login(...)
branch
:Optional[str]
Optionally specify the branch the notebook should use after login.region
:Optional[str]
Optionally specify the Modelbit region the notebook should connect to.
Returns
Modelbit session, typically stored in a variable named mb
Examples
Normal authentication
The typical way to authenticate with Modelbit:
import modelbit
mb = modelbit.login()
Authenticate to branch my_branch
Authenticate and set the current session's branch to my_branch
:
import modelbit
mb = modelbit.login(branch="my_branch")
Authenticate to region ap-south-1
Authenticate to a specific Modelbit region:
import modelbit
mb = modelbit.login(region="us-east-1.aws")
It's OK to authenticate with a different region from the one with your workspace.