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

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.67.1
File Actions
oxenai-0.67.1-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for oxenai-0.67.1-cp311-abi3-win_amd64.whl
oxenai-0.67.1-cp311-abi3-manylinux_2_34_x86_64.whl CPython 3.11 abi3 Linux glibc 2.34+ x86-64 Details for oxenai-0.67.1-cp311-abi3-manylinux_2_34_x86_64.whl
oxenai-0.67.1-cp311-abi3-manylinux_2_34_aarch64.whl CPython 3.11 abi3 Linux glibc 2.34+ ARM64 Details for oxenai-0.67.1-cp311-abi3-manylinux_2_34_aarch64.whl
oxenai-0.67.1-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for oxenai-0.67.1-cp311-abi3-manylinux_2_28_x86_64.whl
oxenai-0.67.1-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details for oxenai-0.67.1-cp311-abi3-manylinux_2_28_aarch64.whl
oxenai-0.67.1-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for oxenai-0.67.1-cp311-abi3-macosx_11_0_arm64.whl
oxenai-0.67.1-cp311-abi3-macosx_10_13_x86_64.whl CPython 3.11 abi3 macOS 10.13+ x86-64 Details for oxenai-0.67.1-cp311-abi3-macosx_10_13_x86_64.whl

Total release size: 238.4 MB

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

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

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

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

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

Download URL oxenai-0.67.1-cp311-abi3-manylinux_2_34_aarch64.whl
Size 32.9 MB
Tags CPython 3.11 Linux glibc 2.34+ ARM64 abi3
SHA-256 checksum
How to use checksums
3f82554c951351c5256743fb556f23d15d03e2e7eff546b9a715d2a3f8916163
BLAKE2b-256 checksum
How to use checksums
5bf12473f1575bebcfed1eddc6e140ef666ce321b8f00963751091d46547c7fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.8.4

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

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

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

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

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

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

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

Download URL oxenai-0.67.1-cp311-abi3-macosx_10_13_x86_64.whl
Size 35.5 MB
Tags CPython 3.11 abi3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
8b4167e9cd226094cdb532e50f1e484b8aff6121c9adca56c886548ab2f2d7cf
BLAKE2b-256 checksum
How to use checksums
0beedef0eb25772f3de823fd0f4d291fec3447fff3803ee92443298c809c42a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.8.4

Security for oxenai 0.67.1

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