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 🔨

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.

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.48.1-cp314-cp314-win_amd64.whl (44.2 MB view details)

Uploaded CPython 3.14Windows x86-64

oxenai-0.48.1-cp314-cp314-manylinux_2_34_x86_64.whl (50.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

oxenai-0.48.1-cp314-cp314-manylinux_2_34_aarch64.whl (47.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ ARM64

oxenai-0.48.1-cp314-cp314-macosx_11_0_arm64.whl (43.1 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

oxenai-0.48.1-cp314-cp314-macosx_10_13_x86_64.whl (47.4 MB view details)

Uploaded CPython 3.14macOS 10.13+ x86-64

oxenai-0.48.1-cp313-cp313-win_amd64.whl (44.2 MB view details)

Uploaded CPython 3.13Windows x86-64

oxenai-0.48.1-cp313-cp313-manylinux_2_34_x86_64.whl (50.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

oxenai-0.48.1-cp313-cp313-manylinux_2_34_aarch64.whl (47.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ ARM64

oxenai-0.48.1-cp313-cp313-macosx_11_0_arm64.whl (43.1 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

oxenai-0.48.1-cp313-cp313-macosx_10_13_x86_64.whl (47.4 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

oxenai-0.48.1-cp312-cp312-win_amd64.whl (44.2 MB view details)

Uploaded CPython 3.12Windows x86-64

oxenai-0.48.1-cp312-cp312-manylinux_2_34_x86_64.whl (50.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

oxenai-0.48.1-cp312-cp312-manylinux_2_34_aarch64.whl (47.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

oxenai-0.48.1-cp312-cp312-macosx_11_0_arm64.whl (43.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

oxenai-0.48.1-cp312-cp312-macosx_10_13_x86_64.whl (47.4 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

oxenai-0.48.1-cp311-cp311-win_amd64.whl (44.2 MB view details)

Uploaded CPython 3.11Windows x86-64

oxenai-0.48.1-cp311-cp311-manylinux_2_34_x86_64.whl (50.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

oxenai-0.48.1-cp311-cp311-manylinux_2_34_aarch64.whl (47.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ ARM64

oxenai-0.48.1-cp311-cp311-macosx_11_0_arm64.whl (43.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

oxenai-0.48.1-cp311-cp311-macosx_10_13_x86_64.whl (47.4 MB view details)

Uploaded CPython 3.11macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: oxenai-0.48.1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 44.2 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.48.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 8e3bf1a8e4c37f19db4c6905f4f670f43d4b67c9574961249d50aec0d3baa552
MD5 9832022e9118ac3860a348bd06e45026
BLAKE2b-256 4604b9f9d2a09a5c78f0804ba5ca051c648bffc7537eb780445c2f5ec26042d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.1-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9c13f330de7ead424c0635dbe950f448c6693363e28bfb7ddd8b3a09620b8993
MD5 2c64d9cf00be7f9820e132646e52d79d
BLAKE2b-256 a433700455b7de33072e2fc36bb9f64a9496e8312451014c3e294aeda327ba59

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.1-cp314-cp314-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 46c36615407049183c3e227d37f162c3fc5f89d814796b36fe5561d2b82ea58b
MD5 494e9a17265b5e37a94773b4d55e0538
BLAKE2b-256 0d6555f434387fe747548203a042956dc0317a6123be6bd01f562712cf3bb872

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c8d2214b3eadbc1b460515b4db8ffa893109cbe3bf1c53e1580f1b624778e12e
MD5 3e2bfa3d0b206f22fabbb48daa6d4234
BLAKE2b-256 a3e9e2a5ba3b16422aefec37ffd8fa48a83a9e66151d5d0673f927d4e23543a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.1-cp314-cp314-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 511a78955d4349bdcb9b86bc69e092437abbf15f75c19a023551e7e66db0aa4c
MD5 5ce886806118a86508b15544a1987942
BLAKE2b-256 830db6777e3a3ea3b48135a8d0030b966423f9357a7a39bc92296f8fd4bc1fb7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.48.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 44.2 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.48.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2e156d1dd0b399c6e763edd790a5ea0067e2dce34db9432d0e3760502617427d
MD5 957a9a04af1c56fd05595a31c1fe73ae
BLAKE2b-256 fb6c324468b4909bccc251415ab72f01bb4155a2ef3097eeedef35637be76467

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.1-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3629ab096ae851b9733c8caa2e16960f9d1f621abd672984a9a15d729f7d5366
MD5 635db314bd36a45ba1809c07367072e2
BLAKE2b-256 cdc3d465361a1f0d653d0eec0f77e5cc7e05bd195cf0b39b0da8eecf066e192c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.1-cp313-cp313-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 7396b42bce34475da945b7908f471c9e64a469bfccd5ac682a5ff9de152cc0d4
MD5 ab5bea285ca315e6f40e6a1bcf3a1c4b
BLAKE2b-256 91b0e8b9f9cc57d4f2bc3a3d851da4fa72255f532938de01160d42f9c5c1da70

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 47377b3cc2c1dec56a5e64b8d9d3ebabc777256b35201a2a487a06208f3f483f
MD5 578cd29341ddd9e612e3faf5f439db2b
BLAKE2b-256 747fa5efde108eebfed6b5911aa199abef375b05f41640b2cad6d0c3a233ae2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.1-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 cdb8c97ad413a8161d244aba5a22797e2ae1e327131fd5a6807b451aa2a39d1f
MD5 bae70ed2a593e5ee100cf2c44a9a5791
BLAKE2b-256 73cd4250f40586ddfda9779c0827220d1d5a228143b4047c6f97adb9e5ca8bc8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.48.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 44.2 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.48.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 897f780949c0fec531101f5290607ac3dde729e1a382ee9a57f727e5beafb47f
MD5 6cd653de9c08ca765f66c90875a9d17c
BLAKE2b-256 5d6039554ee3a611090b47eec90928114e3cdc16d4502c65d282e221cfd74725

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f3df582c81274c431a3bf99592d8a5b9b24bf5de778416bdb9feedc4e7f20a48
MD5 e4cf0d199b2c046ede4c7a8558071728
BLAKE2b-256 a40c6f6a12bdb1c9a43ab575f5aa99febe7b9e9146b04920b59b06c5255af94f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.1-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 bc2dd86d861468ec3a84e07e876b0b3c273ede0ba6f3d74bd87fd78a3446abdb
MD5 fa0a981eb0cd06c0367ba775a2f5ceb6
BLAKE2b-256 6d42e73431af984caa2b6e53db7a35378f1ed08c9c11819073c30f36cba1c5b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 101135ab7ecd8ca90eda2fa00c56fd7b3782090f34e02e4ce4fc97ef5b2f4cdf
MD5 26628a9ed5633fa0144b8c6242857cf8
BLAKE2b-256 d616fdca28815317bbbb876cd8e6f543193245272449ba1ac80524e419cd34b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.1-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 81312a77c590827e6fbc2cb1c15dae60eb0a12f8e931b96398a9ed924ba8533c
MD5 714b35e41754cf1cc2ded6d0e6107b49
BLAKE2b-256 d411be2e6c69f817394046505e0d64980a032fea619f218915962ae91c75223b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.48.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 44.2 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.48.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 10f9941ddf41515685c380092bce9ba8fb94c2c97b31b9643b4bf3231d7106d8
MD5 662000e66d80933c3b9e8487b3dbc7ff
BLAKE2b-256 b13700c40eef7ad35ca95caecdf0afc1085ee0aa5b6b7deb66198b5275563441

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 421274ff78bff1aeb1b00f097cd4d49a4bbb0be07db23d8c372de29933c40895
MD5 365202c7076a0ff8eebe58e80d419af9
BLAKE2b-256 a9bae2d7ec683e31bbe6d17f9c6fc075e23fd596c2d00158bce611912c25102a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.1-cp311-cp311-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 2deb38d00cb3dadb0ec06739509dc4b4737c3b51f1393f61e86826f508094127
MD5 7ad8330957d861de26c22aa540b1ef43
BLAKE2b-256 4c90d3508d9fdf3871b38588d4ece8fce5bcec5881f036b9a2dde75bfa909645

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 24fa339be1486e0ebeede2baf43c4635e30081e288ef4728bed2e68dbb88635d
MD5 0a1c3ef3d0715998816c6bae341c6257
BLAKE2b-256 99465d9276397a9909fac5e5fc6f82174ebbbe7314549bb363d233a18d75e376

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.1-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 46c39017b44cbbce637f151ced217b7267a97d1e41e2d1999d62c14b46c4b382
MD5 36badb678afb4d2d299e710e9ce7f0e3
BLAKE2b-256 c991bb423ccb874d6eabb4c4c7cb21caf3536ceef7e535054d840e0dd8e35fa7

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