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

Uploaded CPython 3.14Windows x86-64

oxenai-0.46.7-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.7-cp314-cp314-manylinux_2_34_aarch64.whl (43.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.14macOS 10.13+ x86-64

oxenai-0.46.7-cp313-cp313-win_amd64.whl (40.7 MB view details)

Uploaded CPython 3.13Windows x86-64

oxenai-0.46.7-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.7-cp313-cp313-manylinux_2_34_aarch64.whl (43.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.13+ x86-64

oxenai-0.46.7-cp312-cp312-win_amd64.whl (40.7 MB view details)

Uploaded CPython 3.12Windows x86-64

oxenai-0.46.7-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.7-cp312-cp312-manylinux_2_34_aarch64.whl (43.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.13+ x86-64

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

Uploaded CPython 3.11Windows x86-64

oxenai-0.46.7-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.7-cp311-cp311-manylinux_2_34_aarch64.whl (43.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

oxenai-0.46.7-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.7-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: oxenai-0.46.7-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.7-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 73b3066f588994ee7e396cbbe968d16a87d8289fbe8efa7046338af1cd350ae6
MD5 b6ea17d87a3b7e465beee0c6ff955dea
BLAKE2b-256 f6af595aa1157836a26085f003323181c4cd88f09e47ba9b4c0af63c7897b730

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.7-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1e81ab6364dbc657dd371dc537b77f21d08fa48135162dd2ef9e60e8e7d63bb0
MD5 9aa7119cedb9a9ef01be18e214f3b0f4
BLAKE2b-256 f9c6fff14b7c2339c0ce950c6373864a5c3a99b7a11097b2a5c49b37f9c237ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.7-cp314-cp314-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 4f455fb807d439541311043f1144d2e4f221539adf338e5e97944999b12e8378
MD5 b93fff9340f5e11799227fd15c8e39b1
BLAKE2b-256 98c7cbd0a8cf8983f7590893eadf6cc1ca1276806a313f9a2a60c70461c92abe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.7-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b5a090dd90a4f322f2cec4946c9a66c026c328d8ae4db18ba4b98f6caf56db47
MD5 7bae5a001afadc6589341f63adfd9ebe
BLAKE2b-256 c1551be2511493718f57c1f9a8d3dc0c5cc49234394de5dcaadb890fe73bf442

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.7-cp314-cp314-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 1ccfc0e9ae4da6f5f696639f31b1fb911b3240109751479ee3134b4a065fafda
MD5 fddd6a2a2ed385ca486d2c957afc65ba
BLAKE2b-256 3136b0587abcbbf99cc0af7acb609e80c85a6a05cac1d702d84296c846d7165d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.46.7-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 40.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.46.7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 314888bbb480db583c3e4a8fc2acfb23e6cf14c3bb07084548d56acd051c1a65
MD5 1dd49bb424f0f3688ee41d07bfe7db56
BLAKE2b-256 bfdb7c24554ed4d64084c14ce16fde212585ac63377daad779a45dad09f9d12e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.7-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e54bf4440be882f020ba6784856a4a1f0aed9bd1dff370794d5de74c16b95528
MD5 f99c7e7445d2c5eda77f3f0abdd7b526
BLAKE2b-256 181c3b2a9f0a8636fb7d79bf7b73d58a42d7e1d21137448d4bc8637540bfc844

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.7-cp313-cp313-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 8f57123caccc6241b3cd0619b43de73126bbf2c1089a89a53cd8997e825a0897
MD5 cd3321d573c7bc27996943bae01f4db9
BLAKE2b-256 9012f05e010e3f245f904c1277a2939ad503be94c6d9acc5c62286e55fa60b05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.7-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 31b48a7dea68dc7a917c9b911f7106bf403bf6a989ce4fb888beb96ada45815c
MD5 6e1c8d8b3afae2fd075b8b2963af2f46
BLAKE2b-256 7f4fc02c782ab1b2b61a62e4bc0968cc69eae37e49d943bcb9c549421e9b7ffe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.7-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 0a9545c72dcb844c5568079db603f77f3a2eb4e0a293c85b64c58f40d9d2894d
MD5 f8670fcf38ee5fd19b0e9bcdb3350f94
BLAKE2b-256 5cbeab3f0a46bbd723c8eebdce12a18206bb33c9263b75a41272f48b08309a2f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.46.7-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 40.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.46.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4889c827a8569945fa8b55fc1582e10c41e8f5f0b7fadaf0002699bbaf3b4c77
MD5 d2ff05e3e5bffeb211a8c32e845ddb5b
BLAKE2b-256 38b89601d58d75b61f3e87b969d6fe4651a2c6f812fd97cca0a04e51d0f47ccc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.7-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 74096c7ef2e5febe8970fc22376fa326dd11e0ffb0ed6bb3d4ab801ffa837176
MD5 380115a73528c73da298d5eb1b71b422
BLAKE2b-256 ab8eac09f306662cb66f6fbba722b034e9a46642e67090f6fc9031dbef643c1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.7-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 8b6001c0d3215cddd7ce3c499f3e3a0bee8bb8d74a5bcd0a7193a5b3254052e6
MD5 cb7d7395e83a63c22e4a086c8ec467a8
BLAKE2b-256 abde89ff57168516ec79ebcf72604de0e24ea6e36732c888e0ff1af35e6c1944

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b0c670dfba6f53e5724b58233aa2ca83aab66186cc3f9eff420e7915e6436561
MD5 6d0b331706cd16cecd4aa4681f7e70f1
BLAKE2b-256 7a09ff81d0004c74ce7f044b95de8aa9218e596dec2a154130d17686a4ba62a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.7-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 7cc75be51535d0f31d5e711cc4a4ee96ff956b7125a7fcdcb4a6418749adf1dd
MD5 880b4180d87fdf3a8a0fde4bc4a597bf
BLAKE2b-256 36163cc8efe4754ea3d5fee00195bdd96197584a96da43434c45b3c4a7ffe549

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.46.7-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.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 cdb837e3f7b609181c6a51536197e5d43cf05e7d1342b1a6bf60116a5485a6c2
MD5 7f7c9280f923230228bd746fb3c4002c
BLAKE2b-256 c46edc6c6fa7752c302ea73ceff757b145076db6fa7b365109ebf0b2d65b0ed6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.7-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3c0b47d39bfd3169fbdcd8b2acfc7742a76caa38c3fa09765e28fe00acb6dac0
MD5 1b68d568699ea0b80a0cd3114affc843
BLAKE2b-256 e49546d892c16cc3d63231c198af2d122821df9a56b9c35e34cbc20808ca69c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.7-cp311-cp311-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 5ab18b9f7c31cdeaa5bcdf0b3f7aac80200ad78145f9802641b9fb8597f0cdb2
MD5 ccaf5c80e88315d9da30da3bee009fcc
BLAKE2b-256 ab8db35a3086c0dd4d9c5bcf3b6412bff21cede0de37ac9627aef356aaae32dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 df6b9fc398257256c0fafc123dd1dd3d7a5f2136ff88595aaa8871a894f5e8b0
MD5 7fc00df6de33767103e5a8fdc61f395d
BLAKE2b-256 c2ca0b4832e98239a127d77928c604540ac6716039a589e4b4291c47931a6c53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.7-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 22f81d14d92758e0e946f67c59bac70abc8f726c2cd80a6c2499cf382f4e457c
MD5 18160faabb08fdeab7705deebd13c918
BLAKE2b-256 b18cfdcfb4623e6988443a80fb592863dbc3ba81cd615a78586dadc29c903bf1

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