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

Uploaded CPython 3.14Windows x86-64

oxenai-0.47.0-cp314-cp314-manylinux_2_34_x86_64.whl (50.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

oxenai-0.47.0-cp314-cp314-manylinux_2_34_aarch64.whl (47.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

oxenai-0.47.0-cp314-cp314-macosx_10_13_x86_64.whl (47.3 MB view details)

Uploaded CPython 3.14macOS 10.13+ x86-64

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

Uploaded CPython 3.13Windows x86-64

oxenai-0.47.0-cp313-cp313-manylinux_2_34_x86_64.whl (50.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

oxenai-0.47.0-cp313-cp313-manylinux_2_34_aarch64.whl (47.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

oxenai-0.47.0-cp313-cp313-macosx_10_13_x86_64.whl (47.3 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

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

Uploaded CPython 3.12Windows x86-64

oxenai-0.47.0-cp312-cp312-manylinux_2_34_x86_64.whl (50.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

oxenai-0.47.0-cp312-cp312-manylinux_2_34_aarch64.whl (47.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

oxenai-0.47.0-cp312-cp312-macosx_10_13_x86_64.whl (47.3 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

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

Uploaded CPython 3.11Windows x86-64

oxenai-0.47.0-cp311-cp311-manylinux_2_34_x86_64.whl (50.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

oxenai-0.47.0-cp311-cp311-manylinux_2_34_aarch64.whl (47.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

oxenai-0.47.0-cp311-cp311-macosx_10_13_x86_64.whl (47.3 MB view details)

Uploaded CPython 3.11macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: oxenai-0.47.0-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.47.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 e5a41cada30071742df624b4733fcc931a4c41ca7dba4cd8b3d7ce9ee7eb7bc1
MD5 87555beb6df7e87f9d3e54210804564e
BLAKE2b-256 db2bf59b816fcb41b95c833781ea6d552a573daa9b7f250ae72b50a5baf909dd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.47.0-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ad31a03d1ec7eeb6ab5ffdcd2c89962c80a0d5496e4bf6ec5927f5f84154f87e
MD5 d4b05b7002fab9c2057d7e84abcbd3d5
BLAKE2b-256 a0c7052b68e296e462df2bc8fb574529f40cb598f9a83144e73c1e076894c894

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.47.0-cp314-cp314-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 4baf70313253bb496879262f1e9894eeba484c7cd38475007ce27079cf64d2c0
MD5 af79426ad5b59530fc884794f8fa40a0
BLAKE2b-256 59002a00e26448a7aa35c703ec0fd65f17318330d0d37c7eb37a937291c7e9a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.47.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 89e6a2154c0476a35ca5a8292c0eaf3604a78d36014ceb4638996122d37bb220
MD5 f487e4d946a43dc338dfd31780dcb6f5
BLAKE2b-256 8250ec7c35c069b8a7ad9c02a8dd6d7b0d1c6b8a40cb7756051dd24caf0178d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.47.0-cp314-cp314-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 271b48882bc0fdcf94b8dfab02a60cdde2932994e7ca326e379906e1ed370c11
MD5 17a7f3070e32e86536203df7f646917c
BLAKE2b-256 35a2cbccda527215eddee59c2367ebf6b9d353bc90167d09bcfcf22988f017b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.47.0-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.47.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 447f5ab79f08b25f5eb840578190aed524f71da47e87bbbdc1c15165e9f87425
MD5 3215bccfd4dba681d57d6d1f322dbde9
BLAKE2b-256 916f2e24383ff9abbbbc2dd7a6bc38f593fab1577481297c6848d146f4201409

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.47.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 dc83795b0004704a68c6117c8b64974587c535190e81c5769ab1246b0f463d65
MD5 1a5f4637395329c3aa87286e911e8547
BLAKE2b-256 6e5c48e99b37d6c5bb166ed39c9852fee83bbf4edf212e53fa4b36bd7c7c3f6c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.47.0-cp313-cp313-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 1255b275f85e9e9edbbf4bbf527978e7bc71a19b8349d9de02c4899ad007cebe
MD5 4791b265641abd683cb8fdd456c5fcae
BLAKE2b-256 40e894ddb82a17faf7ffb55d6d0c488707ceb900078550e8e2d482469d9ab09d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.47.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1499d2e709efff8136355f2a5a26bd1c2f8048fd87c434696b96b4c8dff9cbd2
MD5 765848a11d5fa970bbaf95159924f781
BLAKE2b-256 ec1a97507f471d79470109465c6db7d2035d1ad989cb302a9a903701867ee9ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.47.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 c36e737aa8ca730e1316da018eb19d8fc63104b8644cd83d5789a1d062a0dc5f
MD5 20107dd299eda029527bdc13cf135b00
BLAKE2b-256 f04592421a4ce4eedf33ca585978da864d885bb0c069c25df80f7f049b6dc8c6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.47.0-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.47.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 12647b04d19f22a722d2492ba9a57493c7af76e7b0810a9b0c0db4579cfdf8bd
MD5 2f8ecb27a09e27b15bbe2a396e1df3eb
BLAKE2b-256 786dd89f62e0fa1a9012f0cdf9b2ca8da7ec31808e47f759d25373c143313d58

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.47.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 fe297d30ff7dd64fb2ca4843796cc62d886c5c5cd55a12e7bcdff61f0d30a1d9
MD5 7fbe1acedea09370b89f8cd9d58e0564
BLAKE2b-256 f99614615446bce62840c37eb073b6ac468c1a1d1e6d7af00c310720ac9fd5de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.47.0-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 4db1261d1f14169bb27f0d0923e369c8b52484fa32fd11820972b90b411ed0fb
MD5 d3474e3c88bd630dc5241220aea71ef0
BLAKE2b-256 c03af6a6b9f1b7b585cc53fb2df70f9728fae515d82d3cd2b0e4a6de18910718

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.47.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 be2368df0a72d939bf22971f00119d2b337892100e772ed8cf8b6e8b34895255
MD5 304c5b2c6864bfb41ee6f74f89b26fee
BLAKE2b-256 97f8a699032fba0932e7456c95011984ceeb926bc7683d01c9d192c983500d69

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.47.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 0e4dc5b39ea6736d388aa8a85080249d532238a4769c824848a591d700b2e9db
MD5 235df5ae0a38a1c7dad3ef56f2f38cdd
BLAKE2b-256 955c15b1203edf295726b43a1fa974140d1a54a6543561f54502ea83dc13572c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.47.0-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.47.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c45a14bf918a5ab606d85b5515f647a0e3bf1bf7624c8de6b4c5c7d48daada73
MD5 98ef0bb8852e81cf565d388ed323223e
BLAKE2b-256 dd3dc1af4b2068e75c0bd716caee8cd0b1b48984bdfda60ef013dfa1fa432617

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.47.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 86af5fe274a9da7f027222d7a065c6a2f8e4d69afb90933d9a0b8c5d4ca19e24
MD5 eba4a9a40093562e6958fd53e5a82db6
BLAKE2b-256 b9d68a0817212e7b8a84b32266b0954fb432b2c86640ec89292e955914868133

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.47.0-cp311-cp311-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 09f2fdb570953f403a31f6e444ddcfcf9ce08bd422536b4ea246c100068e697d
MD5 62270e34927b8150f486c7eb13f9a4b4
BLAKE2b-256 c5378b1671db9f3d4d4205d8d0229ed3b4730e06994449ff2f76089239e8d5d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.47.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 93f4677437fccf1a913e36419db3974f01a168a9b676530c0951f1a5160aceaf
MD5 3b832658bde9feff310c0cebbc5eacb5
BLAKE2b-256 a83469e394014a0fd85b4e6fb9563f7f006c3a2a4f6e43432f2cc2d6a77e20fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.47.0-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 8a738b61ee785e25581692ca0df63aa5d9f3f8507d890ef264ad20ca40117b5f
MD5 e3e8497412c1e46fe037df59f0f5feb7
BLAKE2b-256 11c3009bb774769c5abbc27e1c00e592d8175426750d258c0a756258914bedf2

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