Config#

class beaker.Config(user_token, agent_address='https://beaker.org', default_org='ai2', default_workspace=None, default_image=None)[source]#

Bases: object

user_token: str#

Beaker user token that can be obtained from beaker.org.

agent_address: str = 'https://beaker.org'#

The address of the Beaker server.

default_org: Optional[str] = 'ai2'#

Default Beaker organization to use.

default_workspace: Optional[str] = None#

Default Beaker workspace to use.

default_image: Optional[str] = None#

The default image used for interactive sessions.

ADDRESS_KEY: ClassVar[str] = 'BEAKER_ADDR'#
CONFIG_PATH_KEY: ClassVar[str] = 'BEAKER_CONFIG'#
TOKEN_KEY: ClassVar[str] = 'BEAKER_TOKEN'#
IGNORE_FIELDS: ClassVar[Set[str]] = {'updater_message', 'updater_timestamp'}#
classmethod from_env(**overrides)[source]#

Initialize a config from environment variables or a local config file if one can be found. :rtype: Config

Note

Environment variables take precedence over values in the config file.

classmethod from_path(path)[source]#

Initialize a config from a local config file.

Return type:

Config

save(path=None)[source]#

Save the config to the given path.

classmethod find_config()[source]#
Return type:

Optional[Path]