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

Uploaded CPython 3.14Windows x86-64

oxenai-0.48.3-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.3-cp314-cp314-manylinux_2_34_aarch64.whl (47.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ ARM64

oxenai-0.48.3-cp314-cp314-macosx_11_0_arm64.whl (43.2 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.14macOS 10.13+ x86-64

oxenai-0.48.3-cp313-cp313-win_amd64.whl (44.3 MB view details)

Uploaded CPython 3.13Windows x86-64

oxenai-0.48.3-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.3-cp313-cp313-manylinux_2_34_aarch64.whl (47.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ ARM64

oxenai-0.48.3-cp313-cp313-macosx_11_0_arm64.whl (43.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.13+ x86-64

oxenai-0.48.3-cp312-cp312-win_amd64.whl (44.3 MB view details)

Uploaded CPython 3.12Windows x86-64

oxenai-0.48.3-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.3-cp312-cp312-manylinux_2_34_aarch64.whl (47.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

oxenai-0.48.3-cp312-cp312-macosx_11_0_arm64.whl (43.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.13+ x86-64

oxenai-0.48.3-cp311-cp311-win_amd64.whl (44.3 MB view details)

Uploaded CPython 3.11Windows x86-64

oxenai-0.48.3-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.3-cp311-cp311-manylinux_2_34_aarch64.whl (47.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ ARM64

oxenai-0.48.3-cp311-cp311-macosx_11_0_arm64.whl (43.2 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

File metadata

  • Download URL: oxenai-0.48.3-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 44.3 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.3-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 38a17c7cb3c1a48282e2373d68a637c5ef03ce55588cd05e9674a40014ed9985
MD5 c60b960a0814af138e0beb1cab4ce830
BLAKE2b-256 82ff666c0b4fdd499c97dd1df8f29387a5e5407060a9423f979e57dd9ba6c7d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.3-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d7d3f7c956608a7d02e4a27625864179ac1d5262b2987c5109a2ec998fd3b282
MD5 c9baa40e974e7d3ed7233e8cbd045efd
BLAKE2b-256 ba91d3663044b5ffe6b2d9b5a11a0618ca6fa39d5da6893431e3c3ac22e6d433

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.3-cp314-cp314-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 6818c1fe08b89f9423b0af9d8d8e7d4e6c838f40fae88614f257f4b0aa58b51a
MD5 95dfde40fc2c73c62efb293fe2b51469
BLAKE2b-256 6b61dbebb3f3e6af930aaeff88e23ca7fc117af05a1444583e6f68a2ebdd4965

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.3-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f940dc9dd3ed467d8e152067f476c5f253b77f86167b0f297280d1f96502f4fd
MD5 80d1f94e98eba09b7a74832eefc4eba8
BLAKE2b-256 a0a7fdc05db3216a3095f0132b24b5ed34b57c9a950bfe9cc597e11f83d21ccf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.3-cp314-cp314-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 74135141760b95c3fe0fbfc34e7db73d847e8c068831fd0cc63b5deb545a9d90
MD5 52ef872e08e8ef8a91a25818fc5323a6
BLAKE2b-256 1dc1d2d853df331bdd6b8100207376b927bc96f4482709d84c119ae9111c7e24

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.48.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 44.3 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.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 13f336fd1d3751ce711f428dd28a27a5f5d6a96480391ac17c362870dc24d199
MD5 20dde0d8d79d54799cebcf2a6fd6dabd
BLAKE2b-256 0bccd457fa5382fca8f41b7f39be7cac3e840ec42f69c43492c2789b1b2b754e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.3-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 01c1fc5602721c4238003fb7e0d03679f5dac2f3a9216f2cd2aace32d846d27a
MD5 e2cf4b2cc16efa3a0a701d431b22f515
BLAKE2b-256 1666fa269c3c0308f0068306ab2dd751a852ab690597710f1f8d9d860487fc2f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.3-cp313-cp313-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 cf6a5ef93e50c6f55f075da40785e7c8d9b9faed5a97f3e12ce65d54416af105
MD5 3066b5ee0f6a62cd8d6e86fa58df459c
BLAKE2b-256 a1836bf22b354a4bc351844ca9478f969a4203c480dd169dfc6a46a9817b658f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5bf4692f44f3fe1e46df60fb521a1f62a260d7453ca34e62e65cc997de8f78e8
MD5 285748a410b323ab644a4a5ffc2310e7
BLAKE2b-256 73ecdf5748618f20af5f332ea9c044508b867559633aed810345f961d3eeed12

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.3-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 40a9e964669c43b09fb36a0d3154504a7783208bfd5a08af973f431ead0ba8bf
MD5 f4baf86c50d9b33dd5015f210f8e34fe
BLAKE2b-256 0c7141a8bdd3a850b85f92984847cf9812f063d772111886b6db3b6100162a6d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.48.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 44.3 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.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 88ccfe992d4fb9e04ea483a30f0968415b0b91d5f045b5b5fea8c5b4eb099fc5
MD5 5dba06c66d2a73ebf32002e157f5eb4f
BLAKE2b-256 4372c471c525bdf661b35aacb37a655cdae8b3e6e1f874729efa0164210f9605

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.3-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 68818b01557e7091aa8edc910a4141af4ec719b464882eef737a4b2610ceb43c
MD5 881311a10cae2a3eff9994c6af48a270
BLAKE2b-256 b8417598fe8e815ab5bd3f30b738cf480463102629e39b329176d2b8117d63a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.3-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 c8abef6c285366603d806e48c971d717509b141b1195dac024e655255c5df664
MD5 737f3a60b8ae0f9ba0d619604bc08470
BLAKE2b-256 4ab84d9f0655c31473df9c5a695ec26b7c8b0a242301a21c087ee18ec297024d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ba0ec2b7f2c30c1ba9d2ffbc799f242d283b457fa89ed91a8043f7b381790bf7
MD5 a3e6bffc95130a556a1c2f799dc39163
BLAKE2b-256 75303cf4a20616ae4de1e45bec7dd79c288fd92dfb7bbcc199bc36c415dd48bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.3-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 5aea0a62d281c9d891c6adc9923b4cb97b24753f2afa4659bcc1be10f917722b
MD5 69975f7a15b4811dd6f94f4ae5f7dcad
BLAKE2b-256 740c0314cc4e742654a163312e28bf7e92db8d7283a21304410e723cdd65d974

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.48.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 44.3 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.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 63628b58dd19a4e5a861212c76b43be080597357975aaea1162326f9fe53645b
MD5 050dc4f725ef31fc49afec48865d6a06
BLAKE2b-256 668eab62bf2dc783884c714cb17ab9cfd8d86e5fdc0afc321ed0990f3ec41029

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.3-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a27fb666860c12c90489843c8b9edb9155e2082f4b909aae7acb2e521884a028
MD5 ae032c182cb77cd59af74a8696a02ce8
BLAKE2b-256 654c054d7cdc76c68ddfd37316ae6f2073248c3e1b874bd8544f659b41d527c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.3-cp311-cp311-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 7c6647a00fd1b194cd6f61f793d4c35909b5bb06658a9abace58331847c21d66
MD5 d9d865e80654a1bdfe9e8dd97222e35a
BLAKE2b-256 9c6b4668419e1c4a44bd1720960a9d57bb73d00858519496252829de3d327c60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7a4c26509bcd8fe5e44d09b8c92f35e75203ece9362aa543ae17ae2af0884ea4
MD5 686e7f44e54657ca2a58727d22ed3d38
BLAKE2b-256 0e2760cbeeb45fbd7ca2afe46b7db50bd46d644064b982f710cf8535c8dd61db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.3-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 51bd16a2cb0ad945e4932d1ff2cc5bd78612e04c74f612393b742f230afa058a
MD5 e1bf2541cd4b02c99b6fdf1836ae8d01
BLAKE2b-256 f93034506be52c6fa763311aaaf1a58073b85ccfbfb9a6d850205d45754a8760

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