Skip to main content

No project description provided

Project description




beaker-py

A lightweight, standalone, pure Python client for Beaker


CI PyPI Documentation Status License

Features

🪶 Lightweight

  • Minimal dependencies.
  • Only pure-Python dependencies.
  • Communicates directly with the Beaker server via HTTP requests (Beaker CLI not required).

💪 Robust

  • Automatically retries failed HTTP requests with exponential backoff.
  • Runtime data validation.
  • High test coverage.

📓 Exhaustively-typed and documented

  • Thorough data model for all input / output types.
  • Every expected HTTP error from the Beaker server is translated into a specific exception type.

Quick links

See also 👇

Installing

Installing with pip

beaker-py is available on PyPI. Just run

pip install beaker-py

Installing from source

To install beaker-py from source, first clone the repository:

git clone https://github.com/allenai/beaker-py.git
cd beaker-py

Then run

pip install -e .

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 API Docs to learn about the Beaker client's methods.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beaker-py-1.13.0.tar.gz (61.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beaker_py-1.13.0-py3-none-any.whl (75.3 kB view details)

Uploaded Python 3

File details

Details for the file beaker-py-1.13.0.tar.gz.

File metadata

  • Download URL: beaker-py-1.13.0.tar.gz
  • Upload date:
  • Size: 61.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.15

File hashes

Hashes for beaker-py-1.13.0.tar.gz
Algorithm Hash digest
SHA256 13e6df658004359909409a787e5a420bb3a6e90c8ed634d9f383132c53b7fcb2
MD5 eaa0dc6ffcfc41e59ed40a5fb4fe784d
BLAKE2b-256 f3b81e26e56736c4aa2bf0f92037ff02e6723cf0a52faa79348796513460c177

See more details on using hashes here.

File details

Details for the file beaker_py-1.13.0-py3-none-any.whl.

File metadata

  • Download URL: beaker_py-1.13.0-py3-none-any.whl
  • Upload date:
  • Size: 75.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.15

File hashes

Hashes for beaker_py-1.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd63af821f096aff4caafbc982707c6977ffea5f8b119606d216e75e6551102c
MD5 a387f420aceb8bad9a07510df20c81f6
BLAKE2b-256 74d7137a0a31c2fc92cfbcb94b12973ab0765d9a589c6900edf8a75e5ca2ce7b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page