See: examples/management.ipynb.
To use the SDK, you generally will want to set the following environment variables:
FIREBOLT_USER='email@domain.com'
FIREBOLT_PASSWORD='*****'
FIREBOLT_SERVER='api.app.firebolt.io'
FIREBOLT_DEFAULT_REGION='us-east-1'
- You can store these in a
.envfile - environment variables on your system always take precedence over those in
.env
Once the environment variables are defined (either on your system or in .env),
you can initialize a ResourceManager with:
from firebolt.service.manager import ResourceManager
rm = ResourceManager()
print(rm.regions.default_region) # see your default regionOr you can configure settings manually:
from firebolt.service.manager import ResourceManager
from firebolt.common.settings import Settings
from pydantic import SecretStr
rm = ResourceManager(settings=Settings(
server="api.app.firebolt.io",
user="email@domain.com",
password=SecretStr("*****"),
account_name="account", # Necessary if you have multiple accounts.
default_region="us-east-1",
))
print(rm.client.account_id) # see your account idUnder the hood, configuration works via Pydantic, see here.
See: CONTRIBUTING.MD