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

Uploaded CPython 3.13Windows x86-64

oxenai-0.46.2-cp313-cp313-manylinux_2_34_x86_64.whl (52.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

oxenai-0.46.2-cp313-cp313-manylinux_2_34_aarch64.whl (50.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ ARM64

oxenai-0.46.2-cp313-cp313-macosx_11_0_arm64.whl (44.7 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

oxenai-0.46.2-cp313-cp313-macosx_10_13_x86_64.whl (48.7 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

oxenai-0.46.2-cp312-cp312-win_amd64.whl (45.5 MB view details)

Uploaded CPython 3.12Windows x86-64

oxenai-0.46.2-cp312-cp312-manylinux_2_34_x86_64.whl (52.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

oxenai-0.46.2-cp312-cp312-manylinux_2_34_aarch64.whl (50.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

oxenai-0.46.2-cp312-cp312-macosx_11_0_arm64.whl (44.7 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

oxenai-0.46.2-cp312-cp312-macosx_10_13_x86_64.whl (48.7 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

oxenai-0.46.2-cp311-cp311-win_amd64.whl (45.6 MB view details)

Uploaded CPython 3.11Windows x86-64

oxenai-0.46.2-cp311-cp311-manylinux_2_34_x86_64.whl (52.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

oxenai-0.46.2-cp311-cp311-manylinux_2_34_aarch64.whl (50.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ ARM64

oxenai-0.46.2-cp311-cp311-macosx_11_0_arm64.whl (44.7 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

oxenai-0.46.2-cp311-cp311-macosx_10_13_x86_64.whl (48.7 MB view details)

Uploaded CPython 3.11macOS 10.13+ x86-64

oxenai-0.46.2-cp310-cp310-win_amd64.whl (45.6 MB view details)

Uploaded CPython 3.10Windows x86-64

oxenai-0.46.2-cp310-cp310-manylinux_2_34_x86_64.whl (52.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

oxenai-0.46.2-cp310-cp310-manylinux_2_34_aarch64.whl (50.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ ARM64

oxenai-0.46.2-cp310-cp310-macosx_11_0_arm64.whl (44.7 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

oxenai-0.46.2-cp310-cp310-macosx_10_13_x86_64.whl (48.7 MB view details)

Uploaded CPython 3.10macOS 10.13+ x86-64

File details

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

File metadata

  • Download URL: oxenai-0.46.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 45.5 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.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 20a56bbf26d2f4f08d3c6f6572bdd956a247872dbfda1d9767dbc692b767bfe2
MD5 880b587bb014eae51a0d98e21b4ded88
BLAKE2b-256 ff16c8ab4a0efc964998d6fee3f2ec06ae968bc1c663dfb555215a6013d5f855

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.2-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 bc3c49bd16a4dd1a5f47b8059beeb57ab6d88e6a4661d51ca2b428146d0bea2f
MD5 db85da01ffdd6232caf8f2ae0c5272a1
BLAKE2b-256 fd0d18bd673c53e89c3d9d55c2ffd7fb348f9b2f9ca6f043365f95538d51de3e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.2-cp313-cp313-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 66c1f1048587d7a5aff4e21d6786c0065a0aa4da115536f24fdcd26a782a4923
MD5 8b4c0d72dbcb6cf6c9b9fe4da89a2fcb
BLAKE2b-256 689e5ba9f68bf82f46aa79af3a52329cbada7161e04d9019a861ae815874abfc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7d165571d53f0b3b5738ffe53b81d1d5a165db6037321e92815473eb13556dbf
MD5 b1f50c22ca7ee590125f38e13ff72e08
BLAKE2b-256 788731ab1fa5798c47709e1bacde425c494ea3c327c0bc024876c7241842320b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.2-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 bb7781c12cd07efa04e207b1c6ffef007e75d699f243ddc8b80b10bf32874019
MD5 3eb4669f6d1da72aeb9498a4d54bf724
BLAKE2b-256 a39cf3355dcb1064288afdf4b8c4905735c11f791a5e9ce2c04872bad0cf956d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.46.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 45.5 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.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 aac8085554b2afb47e1f85970af528e194b0b6e1d78c334138494585ffd2844c
MD5 8bc490f0025c1dc220a2e258ed88aa41
BLAKE2b-256 2271bae311a5ade9924f32d50c26221eb262ce2427b15bed7caee160d2956bef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.2-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3324bd6c8bdff9eae912e13343ee32f7ab4e1976b7a26a927d0dc2a784d5e28f
MD5 d57dabaa248b01f25410b8ddcadada40
BLAKE2b-256 eb6f5bc3271f6ff24e14cdc19786bcd4c540731d4a083aa0d2de070ad64c4302

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.2-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 73bc12d0a8d54ae301e366e12fd438e4a7119b6475f638079043b39dbc396cdf
MD5 80e111a3f1f57445d32a0bc80d359daa
BLAKE2b-256 e82eb58e8b45af32034472dd4402f61a674cbb357e2029b1778e9f5a00194478

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 60afaa48c345fd5fa922ca46084dc18553f99131bb69b069e1393a1d2b9253eb
MD5 01c7d81a9c112bfd308efed06e530649
BLAKE2b-256 831d68424a729719f64d5d06180538b31d9f6b9def789f9a168bd838b411cff4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.2-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 150b3180854d86daf3ddaaa88c6d56c491a35a800b92a3555235a009a628c6d0
MD5 c9a1940afae38e289587de411e134a3b
BLAKE2b-256 e4e379866fc375937db64f92fbe50123f8b201808330e61fb7248fbef0bdce68

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.46.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 45.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.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fe3dd4ecfdfc94d708fa42ca5c1b774ca29e5c21b7b82d6872f3bbe842d07879
MD5 1ab183df043f9133b481d34536e3e54f
BLAKE2b-256 2dd449e2d61da14873413548e36a029bccd7137b6e6b040da9535c7c3e8cab0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.2-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 58a05a1aecad2eff1878099cecf3396144422e39ea9c3134d3f7f0a3956edda4
MD5 4c5d8f6101065ba65006854d53f1dc17
BLAKE2b-256 cf0288a51e9b37590e5f523abb76ab417d5f7402688a2adc5b380f96a9aad934

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.2-cp311-cp311-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 2a663a04109314c8a02b891ec1a947d6f423502cfb9410e9d147be3134b840b2
MD5 8cd6a7742ba83373058adc3ae6ab6dc4
BLAKE2b-256 e379e5046f2118359ba06e4764ee576561052ac24ebc4106661aec51a6444be2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7f0970955230147b72b0b5dd080a4b618ba99a4f2bb5d8b5b99cd8c038479e7f
MD5 0957040a5864048591800b40726f1c47
BLAKE2b-256 f0a5964dcd162d64a1423da8aaf3ce5274380d8e44cd7a462f7f92ebd5dd0ff1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.2-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 db28a5296f3abcde509de94b7804a0a1bdb2987b8601d60596339d98b519c53b
MD5 a25531eb7c91ece68f5a94ddc0b99152
BLAKE2b-256 8bafbe0790655134a7550d983a418c092c8f388f2ff845b7da3d43e408d8c77e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.46.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 45.6 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.46.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4e4c3f52f36f2b90ccd81c403e011101adb277f5e761c91b996cebe44a81730c
MD5 f04489c31a944d13957a770a1880ae83
BLAKE2b-256 0aec24ef6ebf3393ce0cf3132e6c389012d23aa5ecc8ddd269e024bd2f10455c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.2-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 16530763ceebc8b3aee1e2081f30aa49bd7cc19bb0bf1ae20048ec521e8fb59a
MD5 21989d6ba6286e6a3b6fd53ae0f4cfb9
BLAKE2b-256 53bbc8727bb2aa398e790bb7c92dff22c8d7e4d9ad1cee94e76d70f79d3762c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.2-cp310-cp310-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 8aec7c19b1b93bd95f66e6f12fab7cb041be8e32bddd3ceebb21156d41167f41
MD5 92bb7c6bf24473123329fa59fb6f02d8
BLAKE2b-256 e141ade86bed5a46a6672c1a41e53165d4a3b2c194dd73ad234b9a0cce4a7e14

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5dd6f3e2e5c65f47f204f19d30389637c43eaaa46b8fe4fa41683cdd898f507c
MD5 41e021fefbd7543532688369c21d7abc
BLAKE2b-256 754ad10095eb492b1fc591e1b00c9336488a82e2ca5555376685ca33f2b9bd14

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.2-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 6d295d1c1f8da76f52d3947a23dcc806ca50fbeb5844dd4c99dd0c129df3c921
MD5 70c71ea2e7136a1fb6e0ee419936a532
BLAKE2b-256 56f92a690626a7ca656f76df72e5da57cc0feb6b97f2abb394717f5a8a2db96e

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