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.45.0-cp313-cp313-win_amd64.whl (45.7 MB view details)

Uploaded CPython 3.13Windows x86-64

oxenai-0.45.0-cp313-cp313-manylinux_2_34_x86_64.whl (53.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

oxenai-0.45.0-cp313-cp313-manylinux_2_34_aarch64.whl (50.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ ARM64

oxenai-0.45.0-cp313-cp313-macosx_11_0_arm64.whl (44.9 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

oxenai-0.45.0-cp313-cp313-macosx_10_13_x86_64.whl (48.8 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

oxenai-0.45.0-cp312-cp312-win_amd64.whl (45.7 MB view details)

Uploaded CPython 3.12Windows x86-64

oxenai-0.45.0-cp312-cp312-manylinux_2_34_x86_64.whl (53.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

oxenai-0.45.0-cp312-cp312-manylinux_2_34_aarch64.whl (50.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

oxenai-0.45.0-cp312-cp312-macosx_11_0_arm64.whl (44.9 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

oxenai-0.45.0-cp312-cp312-macosx_10_13_x86_64.whl (48.8 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

oxenai-0.45.0-cp311-cp311-win_amd64.whl (45.7 MB view details)

Uploaded CPython 3.11Windows x86-64

oxenai-0.45.0-cp311-cp311-manylinux_2_34_x86_64.whl (53.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

oxenai-0.45.0-cp311-cp311-manylinux_2_34_aarch64.whl (50.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ ARM64

oxenai-0.45.0-cp311-cp311-macosx_11_0_arm64.whl (44.9 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

oxenai-0.45.0-cp311-cp311-macosx_10_13_x86_64.whl (48.8 MB view details)

Uploaded CPython 3.11macOS 10.13+ x86-64

oxenai-0.45.0-cp310-cp310-win_amd64.whl (45.7 MB view details)

Uploaded CPython 3.10Windows x86-64

oxenai-0.45.0-cp310-cp310-manylinux_2_34_x86_64.whl (53.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

oxenai-0.45.0-cp310-cp310-manylinux_2_34_aarch64.whl (50.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ ARM64

oxenai-0.45.0-cp310-cp310-macosx_11_0_arm64.whl (44.9 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

oxenai-0.45.0-cp310-cp310-macosx_10_13_x86_64.whl (48.8 MB view details)

Uploaded CPython 3.10macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: oxenai-0.45.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 45.7 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.45.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3af79b707e3ae8f33c9698cfa4d133407aa99d99f06fcf237c40ef77c50472c7
MD5 28bea68453d582b24d704d0783c599b0
BLAKE2b-256 cd04c6fedef77f23917d7519653e29ef212521c42aa44d02f3222711ee599daf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.45.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d1e94cc13115c0f49914a7a7a795625729fa5a7fe35eac35f629d5ca6e2555c9
MD5 de75e7c2858a075aaa22a217a4fcbe9b
BLAKE2b-256 325a2af9e500c2ec8529f326ee510a9c3677fb43806432eae0b25cce062afc82

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.45.0-cp313-cp313-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 574929ddd7365983a1cd78ae1622573de71635e9c177abf7de7bbe4d1ee00eab
MD5 f75bf3090485888c71311477995f3cfa
BLAKE2b-256 11a4175d5a35a58388fa5df8fc563151c5a20ba853480d22726dd7a75db8477a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.45.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 64d77bf23ae6d1a96c086f17e906ae89d4899430bfdd800b64393678ef29043f
MD5 d9f76f204e8775df617ca3f2c0176921
BLAKE2b-256 6c2e80ada1427b602d27c5eca5f6fda2c06ed829f64c1a1500f8162d895a2bd4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.45.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 29c11201956001837e7bb8413d2ca28a6880410b4cbd1a2ab3e8e0c1bdb25877
MD5 2c0c0f91f0139fdbb93de8d881fed895
BLAKE2b-256 c1fa361272167de6ffc5e626a941e8bcac574bf2875f345f44dbdb79bb3300f2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.45.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 45.7 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.45.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 67fbaf4e422ec343ac9345b93acba25ee4d4ab28c4d60eac59a62d478daff41d
MD5 a235abe151c683d90bb3b77d96923e6c
BLAKE2b-256 7685ebc44fae29225ba00ed89da4679394a8ca840848df98ecdef5125cf9db69

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.45.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 92531bcc10cb0542f8c565839319f2128be228696ad3062cb183dfb737d18bf9
MD5 b1a73cd20c8ca53433b3f14c281ec3a4
BLAKE2b-256 d85f1c5e500eed83a6c12f9da5129a91aeaf818d3d5746116458e5c84c8c6630

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.45.0-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 961ec085ad1a37d2c09ee01de8ebeae9b244b419524fb74c44f70d5c1bba3cd0
MD5 efdf3516c9d8045330fb6997ca488d7f
BLAKE2b-256 6713cebdf54bb7237b7ccaaba7ec5404323d5981525012cba9b213fb795ca535

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.45.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e1aa0fdfcf2a8290fee2c2ea786831705b9702a3a3086a40842d42acb4b9eca9
MD5 5f5001b4e110d8434d3aa1d0ac8dd421
BLAKE2b-256 df7d651a3d1bb14f630903220e03601054c258844e8746cc8b57020bba9417ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.45.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 d2c46360b864827e133c72cdc71605e33250a9014fe6a6b7d3384b5f74d64466
MD5 c66b187a87c8051ce0679ac08f009c1f
BLAKE2b-256 c28ae5f55c8df8914f29d19b4d4249dc298fc4fcc62c18fbd9ec2b198398d26b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.45.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 45.7 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.45.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fa1d3b11ed11546acbf41f81f1118a213707b9b9d140e9c0f5dba2b0096c547f
MD5 e885258dca7f27a3a4e27a4cd1209216
BLAKE2b-256 1b1f25fa97de4c97620faf8171a8d452a1d52c5cc90933d92a215e8451881c30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.45.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b690bc303a3008874661b1096d19da5998fbac13c9838902cfb9f94b30ce67cf
MD5 135e745a40d8c504e4a61139c3253edc
BLAKE2b-256 840f6f3219c17163e0a3225d463903fba463e709dcba8c321f9388a7ce3fe7be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.45.0-cp311-cp311-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 c5165289b7bb0a58bb946711f605c4b397f3bc3a17281f9eb7e4090513c6a682
MD5 e59de746d1a5e7e9e6118cd000ff2a4f
BLAKE2b-256 76bea5935a943c71adfb8ed60ce2abeed220e3afe8d71a01bcdce05eede132f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.45.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 52e40cbb9dc52ac13143f8f66f68f7739b458594adc29bf376c7a60b794dbbf5
MD5 553161b335d24800318d3ed6c5a8059e
BLAKE2b-256 9051c43031d044ff95b748c55ea7b044c2200c83349e5f93e513587057b60608

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.45.0-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 50bdd7013dccb126b21eb35232ac94d9ef97b8b27913d5a8b909ca377dbef8ff
MD5 c7756cb21a61704749699d69fdc5ce1e
BLAKE2b-256 af21aee08debff93a748e61d231dc13d38acd9b17b4634881824359f754118cc

See more details on using hashes here.

File details

Details for the file oxenai-0.45.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: oxenai-0.45.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 45.7 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.4

File hashes

Hashes for oxenai-0.45.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c5661f00c85fbed0e3b78b5ea9ae74d47a4016eefcd225ac5e913d03e6f42e80
MD5 d245d63425be01129846fa09e2919c00
BLAKE2b-256 259fba6818ae4d9c49862625eb9ebf25d6bf0b265ea9dfe8639e1b90015da4b4

See more details on using hashes here.

File details

Details for the file oxenai-0.45.0-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for oxenai-0.45.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7f8e97dbb763bdf40f9688ad1866480f3e5eb404c46a3f96a66aa6ce16ce3695
MD5 471e49494ac95281495a609b67c70d5a
BLAKE2b-256 031fd168360373ce6b33b30c40e868f9f743374d3d742df2283491377a714b35

See more details on using hashes here.

File details

Details for the file oxenai-0.45.0-cp310-cp310-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for oxenai-0.45.0-cp310-cp310-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 500aa52ca0672c0f056bef577d986fb4e6b026ad0de0cdc85da34ba60d220ea1
MD5 b13d9c541b665f24b36df2f4ed2910d2
BLAKE2b-256 62f93ed78a30185935c5671afdbe497d09738e54c2a2ef063da807d15fb7783b

See more details on using hashes here.

File details

Details for the file oxenai-0.45.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oxenai-0.45.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ae85cb7cf30373a6bcc47ff3e4409dee19bd838fc77d3a93a4e91424cbd709df
MD5 d16590e113816b004dae1e1bd85c6019
BLAKE2b-256 64770a550911817d89626338270412975bfc706d47557061d12a7119422b01b3

See more details on using hashes here.

File details

Details for the file oxenai-0.45.0-cp310-cp310-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for oxenai-0.45.0-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 c8394401b55104a71e3ff80b203c76a63bb80a9cfed05225fa240caf1388abde
MD5 a2745357521eeed9a19c19e11c57be5c
BLAKE2b-256 5aab5248b53c1b1c639551885511a769315ffaeec214846163f50ec82b8c41b4

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