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

Total release size: 239.8 MB

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

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

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

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

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

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

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

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

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

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

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

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

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

Download URL oxenai-0.69.0-cp311-abi3-macosx_10_13_x86_64.whl
Size 35.7 MB
Tags CPython 3.11 abi3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
9fbe1b34aae3b1ff20f37a4a9da3445b7cc1e75d8b3e04eedd8bec86662480d3
BLAKE2b-256 checksum
How to use checksums
90318c66406260929578fbd8cbc46d3c3519682f9d87b5270ccc3637868d6764
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.8.4

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