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

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

Total release size: 237.7 MB

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Security for oxenai 0.65.2

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