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

Total release size: 239.5 MB

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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