OpenBucket Python client
openbucket-client is the typed, dependency-free Python client for a running
OpenBucket management API. It supports Python 3.10+
and uses only the standard library at runtime.
This package is a client, not a Python implementation of the OpenBucket daemon. Start the OpenBucket daemon separately, then point this client at its management URL. Object data is stored and served by that daemon.
Install
openbucket-client is not on PyPI yet. Install it from a checked-out OpenBucket repository:
python -m pip install ./python
After the first unified 0.1.1 release is visible on PyPI:
python -m pip install openbucket-client==0.1.1
pipx install openbucket-client==0.1.1
# or
uv tool install openbucket-client==0.1.1
The distribution is named openbucket-client; the import package is
openbucket.
Python API
import os
from openbucket import OpenBucketClient
client = OpenBucketClient(
os.environ.get("OPENBUCKET_API_URL", "http://127.0.0.1:7272"),
os.environ["OPENBUCKET_ADMIN_TOKEN"],
)
print(client.status().storage.free_bytes)
bucket = client.create_bucket("project-assets")
uploaded = client.upload_file(
bucket.name,
"images/logo.svg",
"logo.svg",
content_type="image/svg+xml",
)
print(uploaded.etag)
share = client.create_share(bucket.name, uploaded.key, expires_in=3600)
print(share.url)
The client exposes immutable typed models and methods for:
- daemon health, status, endpoints, and client configuration;
- bucket creation, visibility, listing, and deletion;
- object listing, streaming upload, download, metadata, and deletion;
- S3 access-key creation, listing, and revocation;
- expiring share URL creation;
- request logs, analytics, and graceful daemon stop.
upload_file() streams from disk. download_to() streams to disk, uses an
exclusive create by default, and can atomically replace a destination with
overwrite=True. download_object() returns bytes and accepts max_bytes when
the caller needs a memory safety bound.
Error handling
from openbucket import OpenBucketHTTPError
try:
client.create_bucket("already-present")
except OpenBucketHTTPError as error:
print(error.status) # 409
print(error.code) # BucketAlreadyExists
print(error.request_id) # request correlation ID, when provided
Transport, protocol, configuration, and HTTP failures have separate exception types. The client does not follow redirects, preventing a management bearer token from being forwarded to another origin.
Command line
Set credentials in the environment so the token does not appear in shell history or the process list:
export OPENBUCKET_API_URL=http://127.0.0.1:7272
export OPENBUCKET_ADMIN_TOKEN='replace-with-the-daemon-token'
openbucket-client status
openbucket-client buckets list
openbucket-client buckets create project-assets
openbucket-client objects upload project-assets images/logo.svg ./logo.svg
openbucket-client objects download project-assets images/logo.svg ./downloaded.svg
openbucket-client share project-assets images/logo.svg --expires-in 3600
openbucket-client --json analytics
Use openbucket-client --help for the complete command tree. --token exists
for automation environments that cannot inject variables, but the environment
variable is safer for interactive use.
TLS and remote use
Use an HTTPS management URL for any connection that leaves localhost or a trusted private network. The bearer token grants full management access. Do not embed it in browser code, logs, container images, or source control. Python uses the platform/default CA trust store and honors the standard proxy environment variables.
Development and verification
The test suite performs real loopback HTTP requests against a threaded local
HTTP server; it does not patch or mock urllib.
cd python
python -m unittest discover -s tests -v
python -m pip install -e '.[dev]'
ruff check .
mypy src/openbucket
python -m build
twine check dist/*
python -m pip install --force-reinstall dist/openbucket_client-0.1.1-py3-none-any.whl
openbucket-client --version
tox verifies the built wheel on every locally installed Python version from
3.10 through 3.14:
tox
Licensed under Apache-2.0. See LICENSE.
Metadata
Release files for openbucket-client 0.1.31
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| openbucket_client-0.1.31.tar.gz | 22.3 kB | With provenance | Details for openbucket_client-0.1.31.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openbucket_client-0.1.31-py3-none-any.whl | Python 3 | none | any | Details for openbucket_client-0.1.31-py3-none-any.whl |
Total release size: 42.2 kB
Release files / openbucket_client-0.1.31.tar.gz
| Download URL | openbucket_client-0.1.31.tar.gz |
|---|---|
| Size | 22.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1975a25ac997a0cca548791c35a1bddab25c4471ce4a538633511a8e59d98283
|
|
BLAKE2b-256 checksum How to use checksums |
f1bd113c60d843928d9b5bd1ea3ad6eadb2a950116ab5bb05eeedeefc84b154f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.
Transparency logRelease files / openbucket_client-0.1.31-py3-none-any.whl
| Download URL | openbucket_client-0.1.31-py3-none-any.whl |
|---|---|
| Size | 19.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c24921e552e565635e982501f2d6f23daebe2f11473894554f869fd76a040c8
|
|
BLAKE2b-256 checksum How to use checksums |
d7961f49cea3e3a68f8971528f8419b1214ba7d2817cc601026da7fd80da212a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.
Transparency logSecurity for openbucket-client 0.1.31
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for openbucket_client-0.1.31.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.