Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 1.47 KB

README_MANAGEMENT.md

File metadata and controls

51 lines (38 loc) · 1.47 KB

Resource Management

Usage

See: examples/management.ipynb.

Configuration

To use the SDK, you generally will want to set the following environment variables:

FIREBOLT_USER='[email protected]'
FIREBOLT_PASSWORD='*****'
FIREBOLT_SERVER='api.app.firebolt.io'
FIREBOLT_DEFAULT_REGION='us-east-1'
  • You can store these in a .env file
  • 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 region

Or 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 protected]",
    password=SecretStr("*****"),
    account_name="account", # Necessary if you have multiple accounts.
    default_region="us-east-1",
))
print(rm.client.account_id) # see your account id

Under the hood, configuration works via Pydantic, see here.

Contributing

See: CONTRIBUTING.MD