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

Total release size: 237.7 MB

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

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

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

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

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

Download URL oxenai-0.65.0-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
db15cb4f49eebfd5f8b66b2dbde0760b066c3055dd03892c573b7ed77a78c374
BLAKE2b-256 checksum
How to use checksums
06e3e9abf6afe698992d56cf9895554863df4dd536ca1d96597f328bb88b75b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.8.4

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

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

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

Download URL oxenai-0.65.0-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
cd67056d3ebd7cb190dd6068c405b647b825c70a8a87533ac2523589d63dd2fc
BLAKE2b-256 checksum
How to use checksums
d125354bf5b09cc379ec966e5e3c8a7fc13b0d406f293ed97dd61df9eb6a9d31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.8.4

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

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

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

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

Security for oxenai 0.65.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.65.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