Skip to main content

ocx-sdk

CI Docs codecov License

Typed Python handles over ocx — the OCI-registry-backed binary package manager. Bootstrap ocx anywhere Python runs, drive its toolchains, author and publish packages against it — all through methods that mirror ocx's own commands one for one, wrapping the CLI rather than reimplementing it.

# illustrative: /srv/build stands in for a real project directory, and
# bootstrap.ensure() needs network access — swap in your own path to run
# this for real, or see the quickstart below for the full explanation.
from ocx_sdk import Ocx, bootstrap

ocx = Ocx(exe=bootstrap.ensure())    # download, verify, cache a pinned binary
project = ocx.project("/srv/build")  # /srv/build holds ocx.toml
project.pull()                       # materialize the declared toolchain
result = project.run(["task", "verify"])

📖 Docs: https://ocx-sh.github.io/ocx-sdk-python/ — start at the quickstart.

Install

Not published yet. On the first vX.Y.Z tag, the release pipeline builds and publishes to PyPI — until then the badges below will read "not found":

PyPI Python versions

Requires Python 3.12+.

uv add ocx-sdk
pip install ocx-sdk

Why

  • Zero runtime dependencies. Stdlib only — nothing else lands in your environment.
  • Fully typed. py.typed ships in the wheel; every public method's signature and result are pinned, checked, and covered.
  • 100% test coverage, use-case first — coverage is a floor here, not a headline.
  • A wrapper, not a reimplementation. ocx owns identifier resolution and checksum verification; the SDK carries identifiers byte-for-byte and parses only what ocx already validated.

Where to go next

Development

This repo dogfoods OCX. Install OCX once, then run everything through it:

curl -sSL https://setup.ocx.sh | sh
ocx run -- task verify      # format check + lint + types + tests + coverage
ocx run -- task docs:serve  # live-preview the docs site at localhost:8000

OCX bootstraps task, uv, and git-cliff; uv pulls ruff + pyright from [project.optional-dependencies] dev and the MkDocs stack from docs. See Contributing for the full guide, including how the doc examples on this page are tested.

Stability

Pre-1.0. Breaking changes ship without migration shims — no deprecation warnings, no compatibility layers. Pin an exact version.

License

Apache-2.0 — see LICENSE.

Metadata

Release files for ocx-sdk 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ocx-sdk 0.1.0
File Size Uploaded
ocx_sdk-0.1.0.tar.gz 349.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ocx-sdk 0.1.0
File Interpreter ABI Platform
ocx_sdk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 445.5 kB

Release files / ocx_sdk-0.1.0.tar.gz

Download URL ocx_sdk-0.1.0.tar.gz
Size 349.3 kB
Tags Source
SHA-256 checksum
How to use checksums
34e082f1bc88cec47d912eb34f9a0ea25350f457e3f43d18e07acced064e9015
BLAKE2b-256 checksum
How to use checksums
90b16aceff81cfdd2d61f5c724899742ff3fbeb2970e1fb14a52c6ecddf0bb82
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 21, 2026.

Transparency log

Release files / ocx_sdk-0.1.0-py3-none-any.whl

Download URL ocx_sdk-0.1.0-py3-none-any.whl
Size 96.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7eebd1d10c5b1f2ad5e7f8476bc47b2a1518e0881d0c155bf084947e05ea27fe
BLAKE2b-256 checksum
How to use checksums
640c4e450ced59e787b283baefaff7d45a2d559f3123ccbffefa021b65d0a997
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 21, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.0

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page