Skip to main content

ocx-sdk

PyPI Python versions 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.exec(["task", "verify"])

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

Install

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 exec -- task verify      # format check + lint + types + tests + coverage
ocx exec -- 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.2.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.2.0
File Size Uploaded
ocx_sdk-0.2.0.tar.gz 536.7 kB Details

Built distribution (wheel)

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

Total release size: 659.9 kB

Release files / ocx_sdk-0.2.0.tar.gz

Download URL ocx_sdk-0.2.0.tar.gz
Size 536.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3a5a576327bf90383c518cee2731d2670962d990df0f33d4a5b469dbc5a91c0c
BLAKE2b-256 checksum
How to use checksums
d68bd0f9ef341039ee6658d04fe909e3202d07d414fb98198e78a82aa0c50075
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 Sep 1, 2026.

Transparency log

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

Download URL ocx_sdk-0.2.0-py3-none-any.whl
Size 123.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2f872a0a38149583ed23a2b341278897069a316403d7ad8b475377b124769ea
BLAKE2b-256 checksum
How to use checksums
c23f8fc6ddcc1e66762bcaca046498027ad427acc04611f0efe23c0b34200a4d
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 Sep 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

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