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

Total release size: 237.7 MB

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

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

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

Download URL oxenai-0.64.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
3b1441b869d5286ab2c24dd0ef0b3c22635710b4bb5b068f347d9e8f2f564ee0
BLAKE2b-256 checksum
How to use checksums
389bf260058cd090ce8c0a0730ec3989718e92ba9fa676b18b11c9afd0df1d62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.8.4

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

Download URL oxenai-0.64.0-cp311-abi3-manylinux_2_34_aarch64.whl
Size 32.8 MB
Tags CPython 3.11 Linux glibc 2.34+ ARM64 abi3
SHA-256 checksum
How to use checksums
6eb551c812efffbd27f83ae03d9c3959cf43126744fd67f90fbc87c6e3bbaa86
BLAKE2b-256 checksum
How to use checksums
57c9b2b5b0d99c6801dfffe0bc3c22efd45d2799d7ad7b8a0e2d0c1268261f5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.8.4

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

Download URL oxenai-0.64.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
5ac7ae71b9945fc018cc847128588fa6fc7d8297856d9bc4e671c110926bf34e
BLAKE2b-256 checksum
How to use checksums
0bf268563574ba93e3ebcc65a8ea54abde826629e5283837251899bb0e7d613e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.8.4

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

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

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

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

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

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

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

Release history Release notifications | RSS feed

This release

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