Skip to main content

🐂 🐍 Oxen Python Interface

The Oxen python interface makes it easy to integrate Oxen datasets directly into machine learning dataloaders or other data pipelines.

Repositories

There are two types of repositories one can interact with, a Repo and a RemoteRepo.

Local Repo

To fully clone all the data to your local machine, you can use the Repo class.

import oxen

repo = oxen.Repo("path/to/repository")
repo.clone("https://hub.oxen.ai/ox/CatDogBBox")

If there is a specific version of your data you want to access, you can specify the branch when cloning.

repo.clone("https://hub.oxen.ai/ox/CatDogBBox", branch="my-pets")

Once you have a repository locally, you can perform the same operations you might via the command line, through the python api.

For example, you can checkout a branch, add a file, commit, and push the data to the same remote you cloned it from.

import oxen

repo = oxen.Repo("path/to/repository")
repo.clone("https://hub.oxen.ai/ox/CatDogBBox")
repo.checkout()

Remote Repo

If you don't want to download the data locally, you can use the RemoteRepo class to interact with a remote repository on OxenHub.

import oxen

repo = oxen.RemoteRepo("https://hub.oxen.ai/ox/CatDogBBox")

To stage and commit files to a specific version of the data, you can checkout an existing branch or create a new one.

repo.create_branch("dev")
repo.checkout("dev")

You can then stage files to the remote repository by specifying the file path and destination directory.

repo.add("new-cat.png", "images") # Stage to images/new-cat.png on remote
repo.commit("Adding another training image")

Note that no "push" command is required here, since the above code creates a commit directly on the remote branch.

Build 🔨

See the prerequisites section of the main readme before developing.

To get and build dependencies, as well as the oxen-python code, run:

uv sync --verbose

To build the PyO3 oxen wrappers only, use maturin and --no-sync:

uv run --no-sync maturin develop

Test

Run pytest:

uv run --verbose pytest -s tests/

If you have already installed all dependencies, and you're not making any changes to liboxen, then you may use --no-sync:

uv run --no-sync pytest -s tests/

Format and lint code with:

uvx ruff check .
uvx ruff format .

Logging

Oxen uses structured logging. It outputs to STDERR by default but can be configured with rotating log files. See Logging for details.

By default, the oxen-python does not perform any logging. Set RUST_LOG to change.

Metadata

Release files for oxenai 0.68.0

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

Built distributions (wheels)

Table of built distributions (wheels) for oxenai 0.68.0
File Actions
oxenai-0.68.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for oxenai-0.68.0-cp311-abi3-win_amd64.whl
oxenai-0.68.0-cp311-abi3-manylinux_2_34_x86_64.whl CPython 3.11 abi3 Linux glibc 2.34+ x86-64 Details for oxenai-0.68.0-cp311-abi3-manylinux_2_34_x86_64.whl
oxenai-0.68.0-cp311-abi3-manylinux_2_34_aarch64.whl CPython 3.11 abi3 Linux glibc 2.34+ ARM64 Details for oxenai-0.68.0-cp311-abi3-manylinux_2_34_aarch64.whl
oxenai-0.68.0-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for oxenai-0.68.0-cp311-abi3-manylinux_2_28_x86_64.whl
oxenai-0.68.0-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details for oxenai-0.68.0-cp311-abi3-manylinux_2_28_aarch64.whl
oxenai-0.68.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for oxenai-0.68.0-cp311-abi3-macosx_11_0_arm64.whl
oxenai-0.68.0-cp311-abi3-macosx_10_13_x86_64.whl CPython 3.11 abi3 macOS 10.13+ x86-64 Details for oxenai-0.68.0-cp311-abi3-macosx_10_13_x86_64.whl

Total release size: 239.4 MB

Release files / oxenai-0.68.0-cp311-abi3-win_amd64.whl

Download URL oxenai-0.68.0-cp311-abi3-win_amd64.whl
Size 34.9 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
78f1ddc56f0b594220b9eb4f2a5bfaf10766f28d39b07f099a7d239d1ec46372
BLAKE2b-256 checksum
How to use checksums
1b798ddf3c3fa81d97f62555bba19d499e482420ce5d70a6ad68a00ee38b4c43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.8.4

Release files / oxenai-0.68.0-cp311-abi3-manylinux_2_34_x86_64.whl

Download URL oxenai-0.68.0-cp311-abi3-manylinux_2_34_x86_64.whl
Size 34.8 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
f1163d30191002ad93aecccd0b7dc6ee663fe220fd7d2a84a9b025b3025b6f6f
BLAKE2b-256 checksum
How to use checksums
1f9858ade524a9cc121b52b534073fd7aaefed3936b9b06117a9831ab752608d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.8.4

Release files / oxenai-0.68.0-cp311-abi3-manylinux_2_34_aarch64.whl

Download URL oxenai-0.68.0-cp311-abi3-manylinux_2_34_aarch64.whl
Size 33.0 MB
Tags CPython 3.11 Linux glibc 2.34+ ARM64 abi3
SHA-256 checksum
How to use checksums
b4e74416cb0284fe3a41a2af10ae3d6bb26ca707589d94d554a93206211fe661
BLAKE2b-256 checksum
How to use checksums
85916f2e54064ba139a35b175ea4a451ca2addba1e8942bd83cdd448bdf6e946
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.8.4

Release files / oxenai-0.68.0-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL oxenai-0.68.0-cp311-abi3-manylinux_2_28_x86_64.whl
Size 35.1 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
5796d094b11e1d1879f99191ec538a1dfdc3ecf138949ed378a40d637ec3958b
BLAKE2b-256 checksum
How to use checksums
b201216ab21f3fb5b383cdcfdfaedec966729f623cae7fa773d22acc8e9dc298
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.8.4

Release files / oxenai-0.68.0-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL oxenai-0.68.0-cp311-abi3-manylinux_2_28_aarch64.whl
Size 33.2 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
b8ec753d5ccf648012279a549d6ef0c3d8f5bd8f34caad01d74cc0c4a1d427ed
BLAKE2b-256 checksum
How to use checksums
f224a68f2587aafa7446d57624574d26a944499430cb74dbc84c3aaaa906742a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.8.4

Release files / oxenai-0.68.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL oxenai-0.68.0-cp311-abi3-macosx_11_0_arm64.whl
Size 32.7 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f3e0efe38dac56f8550dd66697999bc3f6683810346391b961c4633f6580c2e9
BLAKE2b-256 checksum
How to use checksums
668a1a00edbeb9b6aeee01c015d46507115c8ca612cdbbf7ccf8fb74a18fb65f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.8.4

Release files / oxenai-0.68.0-cp311-abi3-macosx_10_13_x86_64.whl

Download URL oxenai-0.68.0-cp311-abi3-macosx_10_13_x86_64.whl
Size 35.6 MB
Tags CPython 3.11 abi3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
d38f31fed9e97d06cabb9af4447a414d9b21be6ffb1164d4b2ce72c6e8a05e65
BLAKE2b-256 checksum
How to use checksums
56a5c4b062bb0d526970fa79bd26575240a8d95298253047beafa06c9185e17c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.8.4

Security for oxenai 0.68.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.68.0 This release

7 release files No provenance

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