Quick start#
If you’ve already configured the Beaker command-line client, beaker-py will
find and use the existing configuration file (usually located at $HOME/.beaker/config.yml
).
Otherwise just set the environment variable BEAKER_TOKEN
to your Beaker user token.
Either way, you should then instantiate the Beaker client with .from_env()
:
from beaker import Beaker
beaker = Beaker.from_env(default_workspace="my_org/my_workspace")
The API of beaker-py is meant to mirror - as closely as possible - the API of the Beaker CLI. For example, when you do this with the CLI:
beaker dataset create --name foo .
The beaker-py equivalent would be:
beaker.dataset.create("foo", ".")
See the Overview to learn about the Beaker
client’s methods.