beaker-py-2.6.0
2.6.0
2.5.8
2.5.7.dev20260402
2.5.7
2.5.6
2.5.5
2.5.4
2.5.3
2.5.2
2.5.1
2.5.0
2.4.7
2.4.6
2.4.5
2.4.4
2.4.3
2.4.2
2.4.1
2.4.0
2.3.0
2.2.1
2.2.0
2.1.1
2.1.0
2.0.4
2.0.3
2.0.2
2.0.1.dev20250430
2.0.1.dev20250429
2.0.1.dev20250428
2.0.1.dev20250426
2.0.1.dev20250425
2.0.1
2.0.0.dev20250425
2.0.0.dev0
2.0.0
1.9.2
1.9.1
1.9.0
1.8.1
1.8.0
1.7.4
1.7.3
1.7.2
1.7.1
1.7.0
1.6.9
1.6.8
1.6.7
1.6.6
1.6.5
1.6.4
1.6.3
1.6.2
1.6.1
1.6.0
1.5.1
1.5.0
1.4.2
1.4.1
1.4.0
1.38.1
1.38.0
1.37.0
1.36.4
1.36.3
1.36.2
1.36.1
1.36.0
1.35.0
1.34.3
1.34.2
1.34.1
1.34.0
1.33.0
1.32.3
1.32.2
1.32.1
1.32.0
1.31.3
1.31.2
1.31.1
1.31.0
1.30.0
1.3.0
1.29.1
1.29.0
1.28.0
1.27.2
1.27.1
1.27.0
1.26.9
1.26.8
1.26.7
1.26.6
1.26.5
1.26.4
1.26.3
1.26.2
1.26.15
1.26.14
1.26.13
1.26.12
1.26.11
1.26.10
1.26.1
1.26.0
1.25.1
1.25.0
1.24.0
1.23.0
1.22.0
1.21.0
1.20.1
1.20.0
1.2.0
1.19.0
1.18.8
1.18.7
1.18.6
1.18.5
1.18.4
1.18.3
1.18.2
1.18.1
1.18.0
1.17.7
1.17.6
1.17.5
1.17.4
1.17.3
1.17.2
1.17.1
1.17.0
1.16.0
1.15.0
1.14.1
1.14.0
1.13.2
1.13.1
1.13.0
1.12.1
1.12.0
1.11.6
1.11.5
1.11.4
1.11.3
1.11.2
1.11.1
1.11.0
1.10.3
1.10.2
1.10.1
1.10.0
1.1.0
1.0.0
0.9.0
0.8.4
0.8.3
0.8.2
0.8.1
0.8.0
0.7.0
0.6.1
0.6.0
0.5.5
0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
0.4.3
0.4.2
0.4.1
0.4.0
0.3.9
0.3.8
0.2.8
0.2.7
0.2.6
0.2.5
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.15.3
0.15.2
0.15.1
0.15.0
0.14.1
0.14.0
0.13.2
0.13.1
0.13.0
0.12.0
0.11.0
0.10.0
0.1.0
2.6.0
2.5.8
2.5.7.dev20260402
2.5.7
2.5.6
2.5.5
2.5.4
2.5.3
2.5.2
2.5.1
2.5.0
2.4.7
2.4.6
2.4.5
2.4.4
2.4.3
2.4.2
2.4.1
2.4.0
2.3.0
2.2.1
2.2.0
2.1.1
2.1.0
2.0.4
2.0.3
2.0.2
2.0.1.dev20250430
2.0.1.dev20250429
2.0.1.dev20250428
2.0.1.dev20250426
2.0.1.dev20250425
2.0.1
2.0.0.dev20250425
2.0.0.dev0
2.0.0
1.9.2
1.9.1
1.9.0
1.8.1
1.8.0
1.7.4
1.7.3
1.7.2
1.7.1
1.7.0
1.6.9
1.6.8
1.6.7
1.6.6
1.6.5
1.6.4
1.6.3
1.6.2
1.6.1
1.6.0
1.5.1
1.5.0
1.4.2
1.4.1
1.4.0
1.38.1
1.38.0
1.37.0
1.36.4
1.36.3
1.36.2
1.36.1
1.36.0
1.35.0
1.34.3
1.34.2
1.34.1
1.34.0
1.33.0
1.32.3
1.32.2
1.32.1
1.32.0
1.31.3
1.31.2
1.31.1
1.31.0
1.30.0
1.3.0
1.29.1
1.29.0
1.28.0
1.27.2
1.27.1
1.27.0
1.26.9
1.26.8
1.26.7
1.26.6
1.26.5
1.26.4
1.26.3
1.26.2
1.26.15
1.26.14
1.26.13
1.26.12
1.26.11
1.26.10
1.26.1
1.26.0
1.25.1
1.25.0
1.24.0
1.23.0
1.22.0
1.21.0
1.20.1
1.20.0
1.2.0
1.19.0
1.18.8
1.18.7
1.18.6
1.18.5
1.18.4
1.18.3
1.18.2
1.18.1
1.18.0
1.17.7
1.17.6
1.17.5
1.17.4
1.17.3
1.17.2
1.17.1
1.17.0
1.16.0
1.15.0
1.14.1
1.14.0
1.13.2
1.13.1
1.13.0
1.12.1
1.12.0
1.11.6
1.11.5
1.11.4
1.11.3
1.11.2
1.11.1
1.11.0
1.10.3
1.10.2
1.10.1
1.10.0
1.1.0
1.0.0
0.9.0
0.8.4
0.8.3
0.8.2
0.8.1
0.8.0
0.7.0
0.6.1
0.6.0
0.5.5
0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
0.4.3
0.4.2
0.4.1
0.4.0
0.3.9
0.3.8
0.2.8
0.2.7
0.2.6
0.2.5
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.15.3
0.15.2
0.15.1
0.15.0
0.14.1
0.14.0
0.13.2
0.13.1
0.13.0
0.12.0
0.11.0
0.10.0
0.1.0
توضیحات
A Python Beaker client
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | beaker-py-2.6.0 |
| نام | beaker-py |
| نسخه کتابخانه | 2.6.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | Allen Institute for Artificial Intelligence <contact@allenai.org>, Pete Walsh <petew@allenai.org> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/beaker-py/ |
| مجوز | - |
# Beaker-py [](https://pypi.org/project/beaker-py/)
A lightweight pure-Python client for Beaker.
## Quick Links
- 📝 Docs and examples:
- [API docs](https://beaker-py-docs.allen.ai/)
- [Integration test examples](https://github.com/allenai/beaker/tree/main/bindings/python/src/integration_tests)
- [v1 → v2 migration guide](https://github.com/allenai/beaker/blob/main/bindings/python/MIGRATION_GUIDE.md)
- 🌍 Ecosystem:
- [beaker-gantry](https://github.com/allenai/beaker-gantry)
- [beaker-run-action](https://github.com/allenai/beaker-run-action)
## Installing
### Installing with `pip`
**beaker-py** is available [on PyPI](https://pypi.org/project/beaker-py/). Just run
```bash
pip install beaker-py
```
### Installing from source
To install **beaker-py** from source, first clone [the repository](https://github.com/allenai/beaker):
```bash
git clone https://github.com/allenai/beaker.git
```
Then create or activate a Python virtual environment, and run:
```bash
cd beaker/bindings/python
make dev-install
```
## Quick start
If you've already configured the [Beaker command-line client](https://github.com/allenai/beaker/),
**beaker-py** will find and use the existing configuration file (usually located at `$HOME/.beaker/config.yml`) or `BEAKER_TOKEN` environment variable.
Then you can instantiate the Beaker client with the `.from_env()` class method:
```python
from beaker import Beaker
with Beaker.from_env() as beaker:
...
```
With the Python client, you can:
- Query [**Clusters**](https://beaker-docs.apps.allenai.org/concept/clusters.html) with `beaker.cluster.*` methods. For example:
```python
beaker.cluster.get("ai2/jupiter-cirrascale-2")
```
- Manage [**Datasets**](https://beaker-docs.apps.allenai.org/concept/datasets.html) with `beaker.dataset.*` methods. For example:
```python
beaker.dataset.create(dataset_name, source_dir)
```
- Manage [**Experiments**](https://beaker-docs.apps.allenai.org/concept/experiments.html) with `beaker.experiment.*` and `beaker.workload.*` methods. For example:
```python
beaker.experiment.create(spec=spec, name=name)
```
- Manage [**Groups**](https://beaker-docs.apps.allenai.org/concept/groups.html) with `beaker.group.*` methods. For example:
```python
beaker.group.create(name)
```
- Manage [**Images**](https://beaker-docs.apps.allenai.org/concept/images.html) with `beaker.image.*` methods. For example:
```python
beaker.image.update(image, name=name)
```
- Manage [**Secrets**](https://beaker-docs.apps.allenai.org/concept/secrets.html) with `beaker.secret.*` methods. For example:
```python
beaker.secret.write(name, value)
```
- Manage [**Workspaces**](https://beaker-docs.apps.allenai.org/concept/workspaces.html) with `beaker.workspace.*` methods. For example:
```python
beaker.workspace.create("ai2/new_workspace")
```
- Track **Jobs** with `beaker.job.*` methods. For example:
```python
beaker.job.logs(job, follow=True)
```
- Create and process [**Queues**](https://beaker-docs.apps.allenai.org/concept/queues.html) with `beaker.queue.*` methods. For example:
```python
beaker.queue.create("my-work-queue", batch_size=4)
```
If you're coming from [v1 of beaker-py](https://github.com/allenai/beaker-py), consider reading the [migration guide](https://github.com/allenai/beaker/blob/main/bindings/python/MIGRATION_GUIDE.md).
### Example workflow
Launch and follow an experiment like [beaker-gantry](https://github.com/allenai/beaker-gantry) does:
```python
import time
from beaker import Beaker, BeakerExperimentSpec, BeakerJobPriority
with Beaker.from_env() as beaker:
# Build experiment spec...
spec = BeakerExperimentSpec.new(
description="beaker-py test run",
beaker_image="petew/hello-world",
priority=BeakerJobPriority.low,
min_runtime="1h",
)
# Create experiment workload...
workload = beaker.experiment.create(spec=spec)
# Wait for job to be created...
while (job := beaker.workload.get_latest_job(workload)) is None:
print("waiting for job to start...")
time.sleep(1.0)
# Follow logs...
print("Job logs:")
for job_log in beaker.job.logs(job, follow=True):
print(job_log.message.decode())
```
See the [integration tests](https://github.com/allenai/beaker/tree/main/bindings/python/src/integration_tests) for more examples.
## Development
After [installing from source](#installing-from-source), you can run checks and tests locally with:
```bash
make checks
```
### Releases
At the moment releases need to be published manually by following these steps:
1. Ensure you've authenticated with [PyPI](https://pypi.org/) through a `~/.pypirc` file and have write permissions to the [beaker-py project](https://pypi.org/project/beaker-py/). The local `~/.pypirc` file looks like:
```ini
[distutils]
index-servers = pypi
[pypi]
username = __token__
password = #beaker-py pypi API token from 1pass#
```
2. Ensure the target release version defined in `src/beaker/version.py` is correct, or change the version on the fly by adding the `Make` argument `BEAKER_PY_VERSION=X.X.X` to the command in the next step.
3. Ensure the CHANGELOG.md has a section at the top for the new release (`## vX.X.X - %Y-%m-%d`).
4. Run `make publish` for a stable release or `make publish-nightly` for a nightly pre-release.
نیازمندی
| مقدار | نام |
|---|---|
| - | requests |
| - | packaging |
| - | PyYAML |
| - | grpcio>=1.70.0 |
| - | protobuf<7.0,>=5.0 |
| - | google-crc32c |
| xtr | docker<8.0,>=5.0; |
| xtr | ruff; |
| xtr | mypy<1.6,>=1.0; |
| xtr | types-requests; |
| xtr | types-cachetools; |
| xtr | types-PyYAML; |
| xtr | types-protobuf; |
| xtr | black<24.0,>=23.0; |
| xtr | isort<5.13,>=5.12; |
| xtr | pytest<8.0; |
| xtr | twine>=1.11.0; |
| xtr | build; |
| xtr | setuptools; |
| xtr | wheel; |
| xtr | petname==2.6; |
| xtr | grpcio-tools; |
| xtr | beaker-py[dev,docker]; |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10 | Python |
نحوه نصب
نصب پکیج whl beaker-py-2.6.0:
pip install beaker-py-2.6.0.whl
نصب پکیج tar.gz beaker-py-2.6.0:
pip install beaker-py-2.6.0.tar.gz