Skip to main content

Data version control for machine learning

Project description

🐂 🐍 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 🔨

Pre-Requistes

If you're developing the Python interface, you'll need to:

  1. Install the Rust toolchain
  2. Install uv
  3. Install the pre-commit hooks to ensure your code is consistent

Development Cycle

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 .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

oxenai-0.46.9-cp314-cp314-win_amd64.whl (40.6 MB view details)

Uploaded CPython 3.14Windows x86-64

oxenai-0.46.9-cp314-cp314-manylinux_2_34_x86_64.whl (45.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

oxenai-0.46.9-cp314-cp314-manylinux_2_34_aarch64.whl (43.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ ARM64

oxenai-0.46.9-cp314-cp314-macosx_11_0_arm64.whl (40.5 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

oxenai-0.46.9-cp314-cp314-macosx_10_13_x86_64.whl (43.8 MB view details)

Uploaded CPython 3.14macOS 10.13+ x86-64

oxenai-0.46.9-cp313-cp313-win_amd64.whl (40.6 MB view details)

Uploaded CPython 3.13Windows x86-64

oxenai-0.46.9-cp313-cp313-manylinux_2_34_x86_64.whl (45.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

oxenai-0.46.9-cp313-cp313-manylinux_2_34_aarch64.whl (43.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ ARM64

oxenai-0.46.9-cp313-cp313-macosx_11_0_arm64.whl (40.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

oxenai-0.46.9-cp313-cp313-macosx_10_13_x86_64.whl (43.8 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

oxenai-0.46.9-cp312-cp312-win_amd64.whl (40.6 MB view details)

Uploaded CPython 3.12Windows x86-64

oxenai-0.46.9-cp312-cp312-manylinux_2_34_x86_64.whl (45.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

oxenai-0.46.9-cp312-cp312-manylinux_2_34_aarch64.whl (43.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

oxenai-0.46.9-cp312-cp312-macosx_11_0_arm64.whl (40.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

oxenai-0.46.9-cp312-cp312-macosx_10_13_x86_64.whl (43.8 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

oxenai-0.46.9-cp311-cp311-win_amd64.whl (40.6 MB view details)

Uploaded CPython 3.11Windows x86-64

oxenai-0.46.9-cp311-cp311-manylinux_2_34_x86_64.whl (45.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

oxenai-0.46.9-cp311-cp311-manylinux_2_34_aarch64.whl (43.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ ARM64

oxenai-0.46.9-cp311-cp311-macosx_11_0_arm64.whl (40.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

oxenai-0.46.9-cp311-cp311-macosx_10_13_x86_64.whl (43.8 MB view details)

Uploaded CPython 3.11macOS 10.13+ x86-64

File details

Details for the file oxenai-0.46.9-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: oxenai-0.46.9-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 40.6 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.4

File hashes

Hashes for oxenai-0.46.9-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 bbb07a0ad9b6dc0f4b709bc6f619b50c59a1d4c0d3e370f8048822d7f5cdd15f
MD5 5e17cefcac6e8d764b0fa6c2dfd205a6
BLAKE2b-256 3f805c66023dc9e87e81eea3a7f228a4f829a63f65e9bd2377f5a3520d93b49e

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for oxenai-0.46.9-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1aa44702ff87a3fc744732e153d28ada5b40781e72ba4be7157f07d4518e109a
MD5 2b724f20a80900b666e97e193fdefc21
BLAKE2b-256 4bf656d35fa23bbcf8a72d63733a1e4f915f58e9bb79ecc7d2466e8307ecb93f

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp314-cp314-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for oxenai-0.46.9-cp314-cp314-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 829243c019c4b10781de8e5fbe81ca4c5c14dda6b8ff8c5185c51b68f77180e1
MD5 2fa6e3d1aa43dde20a5907e2524dc158
BLAKE2b-256 e8650ce7f2474a04a7199d04f0dfd3dd7767e282b6ad5e6c86cae72957a695ac

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oxenai-0.46.9-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5062f4f83de5f2d68eaed965becb21e0b59c5ab3df4bc6ed39d6888e9278ba05
MD5 7cde4c13f74642b37b0457ef669aa0d7
BLAKE2b-256 228863758f08a90883d8cc723095776ec11a5923fbcac47035844910bfb914b1

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp314-cp314-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for oxenai-0.46.9-cp314-cp314-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 cf4ea2a0271d640d7569005cbb8638206279cd2a9932b24c4f3a8f9d7d9f986e
MD5 2a5b04ab0485adc84d02b5b05718e9c0
BLAKE2b-256 b2ac0779291779f7cf7fce18f19fc9aa0391dcce52b61a11bcc189df997a6e57

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: oxenai-0.46.9-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 40.6 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.4

File hashes

Hashes for oxenai-0.46.9-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d519e7033449c896e7586825959111b617223ec9827a9bad1dab1a15ca0fffb4
MD5 7784acfdfff4cbadb1ac1a1c7508af28
BLAKE2b-256 7a3476ebb511aff97e4981db9ea3be4555a3bc4e2ca4b20795c4464ca03a2111

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for oxenai-0.46.9-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3f84da849d8fdef19fd3781dba885df7a18d2b65703dd0a860a405c04f6e6475
MD5 3aa0202911f0cdee8b75fbb321c93977
BLAKE2b-256 c1d572385c7c217b36ddbc7fbcf2c9eb10e1a5bbdd501c5bcf3ba498420fd8f8

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp313-cp313-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for oxenai-0.46.9-cp313-cp313-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 5fc5c81d11b7c8ced056edbdddfebdcd198943dbcedd81e11f8ab833b9edc524
MD5 6584b29951f55e24d01cce79bfd32c8b
BLAKE2b-256 1c7a9c2207f42bdde97fd86161dce16188675f58153070e57189886ca0724415

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oxenai-0.46.9-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 19d8c883d9fb66c13c3725191d3bb2ab329fc18312f91590b4538d6d3c3f1a43
MD5 3c589fa73375355a27e0e9b29347835b
BLAKE2b-256 d181a2f8e82d3c94ca815e2e8ef011d8dd52517edf9de0587bdf714796eeba86

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for oxenai-0.46.9-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 f99e0d9a34cd1facc3e4cf3f168bdd17f1f3de776ede592598c60ce446946cc6
MD5 40356ec030b37e36dedc507db36d77ca
BLAKE2b-256 e0465f9f1496a036f25459bac7b3efa55463f3e7ad10848b63cb33348c84d3c4

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: oxenai-0.46.9-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 40.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.4

File hashes

Hashes for oxenai-0.46.9-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2f602c3689fcfdfcdd06ea3084d8920649190204e2cd2a2a8ee98bf5a80cdd18
MD5 4ff35f69d3825a7a45ec9992e91a315b
BLAKE2b-256 67effa0ddf43c01e7bd1c6e0de080da790d4fbd6835f5798f120d7cc6f9f978b

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for oxenai-0.46.9-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6536906ed65737537ee15709bbe0409eed7d7a29b4a06f4ea8267e247b1031e1
MD5 a9be51dbebdffc16f42fd8bf1b3c1f02
BLAKE2b-256 38ebc2db7a427c2bd806aece8447a34475a8e18c35ce1be3d6a67ddaad268ea0

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp312-cp312-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for oxenai-0.46.9-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 4f992a7b4eb77ca0f50c4e50a31a7907548fd926b07c5c5af066ab0ba177b813
MD5 ede9986aff9f899586b1382735993d82
BLAKE2b-256 20b2254bc70124f03bd6b32fde4b00d3e0e0e2e7eebf385f65d808e61eab54d1

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oxenai-0.46.9-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ed33a58209ed510c25ff74f7fc9f33736467988bf95057d4e71d3f01fc99ef46
MD5 406c603bc0ddf3bb6a6688134b95d329
BLAKE2b-256 fa7533d9babe8850a1f29450d5d987623f65a2959e54e50eda4ce111da5393a6

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for oxenai-0.46.9-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 91911c630be7ed5c77b34bc7d1f5e6b9ec146f3088322f9c78e3ec0b9ef2922e
MD5 9f3cb1290b9e29b41ba559e913339dd2
BLAKE2b-256 8bf01a461e9fe86ee0f0634191eefc62bc016affe1792e1584cc44101e60c619

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: oxenai-0.46.9-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 40.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.4

File hashes

Hashes for oxenai-0.46.9-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 014f7fee864260cb45100e4ec2a96d6e72ff50153f7c11faf1629d2d275ee7b6
MD5 7e0410f4d2e18f01f2a02e1500055d0a
BLAKE2b-256 db4990fcc27fd4fd937551545eb3aeb12e66027d37dba8ede4676cc72fc2569e

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for oxenai-0.46.9-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6bdfa57a110bd3afb832a378db466dc3ef3df71f8e5c36169ae76826ed7a1aeb
MD5 dca38e065d20a0721f0c0febc964b80e
BLAKE2b-256 3e9a3d48d7db9137f74620d05c9f5b1af66c17618d944fb97a82bc0083db2bba

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp311-cp311-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for oxenai-0.46.9-cp311-cp311-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 9b6cecea12465dbcb9e72bf54eeb903845adc4b0789e3119da49e3edd5ed776a
MD5 01d36ec47a171a43a064247e4c42ff2b
BLAKE2b-256 12001ffab413ccb10f3b4577649a7c6a5951c8f5d36c822d2a358628f15ac056

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oxenai-0.46.9-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 605105b0ec22bdf34090d387a7d4d63419c64a5853d86cf362d98b78f8435859
MD5 594b9d226074242e82eabbe3064edaec
BLAKE2b-256 7f5760326ee5fe2c604ce8f970b5238319619d16934b15d31cf44f11aaa1119a

See more details on using hashes here.

File details

Details for the file oxenai-0.46.9-cp311-cp311-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for oxenai-0.46.9-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 e7e66a8620a9bd811c81265269ba62e0b0319ee241aa9b028333d187230236fa
MD5 e1fcd013adc7d46d100f6f6af45ded4d
BLAKE2b-256 e7e20c63457d9147e03e27da874e6c5f870edc5740a41f005611a23294ceba70

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page