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.4-cp314-cp314-manylinux_2_34_aarch64.whl (46.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ ARM64

oxenai-0.46.4-cp314-cp314-macosx_11_0_arm64.whl (43.5 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.14macOS 10.13+ x86-64

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

Uploaded CPython 3.13Windows x86-64

oxenai-0.46.4-cp313-cp313-manylinux_2_34_x86_64.whl (48.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

oxenai-0.46.4-cp313-cp313-manylinux_2_34_aarch64.whl (46.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ ARM64

oxenai-0.46.4-cp313-cp313-macosx_11_0_arm64.whl (43.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.13+ x86-64

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

Uploaded CPython 3.12Windows x86-64

oxenai-0.46.4-cp312-cp312-manylinux_2_34_x86_64.whl (48.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

oxenai-0.46.4-cp312-cp312-manylinux_2_34_aarch64.whl (46.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

oxenai-0.46.4-cp312-cp312-macosx_11_0_arm64.whl (43.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.13+ x86-64

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

Uploaded CPython 3.11Windows x86-64

oxenai-0.46.4-cp311-cp311-manylinux_2_34_x86_64.whl (48.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

oxenai-0.46.4-cp311-cp311-manylinux_2_34_aarch64.whl (46.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ ARM64

oxenai-0.46.4-cp311-cp311-macosx_11_0_arm64.whl (43.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

oxenai-0.46.4-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.46.4-cp314-cp314-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for oxenai-0.46.4-cp314-cp314-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 e5206d0a31a2ca50a0d2e98f5d658395fafb084f2c96e80caab62842a2b80382
MD5 9b40976f01aa43d4acc14baf21e12843
BLAKE2b-256 241d4205792f227910bea2ee7dbf85b3f2ccea2e486dff46e60fe040d1b48496

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.4-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8b31f575016dd4ce33d2f6550a618108648a67b3ea02cabeb3dbbd39965ff6c2
MD5 ccf197660095751993a7e2aae10fce84
BLAKE2b-256 3bcdc74b77722ed12016f7565861909f8b6c880270062204030dd5488b117e47

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.4-cp314-cp314-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 5b62ea86efebeba0c5ddfb78da19595cadd8862057ae4fcc91972402e8a35d23
MD5 683e7d6b39e382d7ed4fe566a4278cfa
BLAKE2b-256 54a7140d2345fd7084b4ec292693dd466abfca70c95af18946764959f950bb54

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.46.4-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.46.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b446025dc511df74c9002d786db3f94c35adefa57b841f3f0b164811cb1242f3
MD5 0a1b08239a482006741317540e0c04eb
BLAKE2b-256 e8ca597c2fff80c031ef7e92e358f279371d14646d5d8a1661fc4fe986ed0c8a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.4-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 fc21028e7bfecbd3485b8035a5a296b1284da1bd42cccb7ec3d5979c360f574f
MD5 b5cdd97d4fafa476ec097bbe363a722f
BLAKE2b-256 f871532cadda664f97814b3612a025f439f7551a6121f930ef13190f20ffdb11

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.4-cp313-cp313-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 02ee3bcf810e9eccf3cce9ec4b679c5706ad3141b1e03aec41d9815ded3e64bb
MD5 fde24de363c8a2f653fda6a4b86a104d
BLAKE2b-256 938f3cc8871cc8cc98ae989dee12d60ce93c1d7e866d615787cfdad8f15b39f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d6663af6135f1eddfeb4a5c9193716fa7ec1c8ba782082aa7492260477076b38
MD5 45d6ba70ceca5805025b88e24cf46d9d
BLAKE2b-256 39531c5acf377b5ea20e0305d41fd816a2b9195e8fa7d06b4d41df2c8a447819

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.4-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 d468cd75eb3ea421c1fb420f4ee98125b034994bce34f97f07415143f349257b
MD5 f62859a36b19adf6cb515de52990b9cb
BLAKE2b-256 8f1f998fb486f04c2483eb7c028185b1c7d976d78eb0fd711263a9db02e491b3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.46.4-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.46.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b0de8d7b76357b960d9058eccf78d0f36be6219f86729bc2a07f0e1de28827d9
MD5 c0df2ee7357543184bfd80ae50e358b3
BLAKE2b-256 b780aa09d4abf45e8a6b8a0b7a5803cdf10afbd747544681f98219fa590bf4f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.4-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 29d9b417b9748f7e862fb3b4956018ed0785ec2c1162b5fdf12a56ef06ed96cb
MD5 9fa25fb960392e6bc3bc1a6b601598b3
BLAKE2b-256 de9d5e0eb8958e4d811a7be894dc2c37a33a6d47d932f880ae74f597f8470f53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.4-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 7e55678aa9250b4fb15b0a60ab48eba56b107e6888ef01cb4ab940d865716e4b
MD5 5b9f8bc56d44d99b0711c7e1377ff163
BLAKE2b-256 172faf1db0428219668f04d19405b11de9df8c925631745086b7b83e953cba60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6eb7f4c00581cac436a928f89dc903160478fbb00c157eda747cebfd3e6999c7
MD5 c918e9f42385d7156bb65da068523979
BLAKE2b-256 f9e967ced60614b1c87680ba5231fcd7e541fabb431bff9ecc4e467028e1dc3b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.4-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 5d34da0d38bedce736f5f09e7b53218edfb40e7b035ddfc12ac2e514d4a958ee
MD5 34a7671b191f2e60396def3003ea2c4d
BLAKE2b-256 1e80391735d987cad59c484dbaf13be9f891e8f9dc7e5445d7d6d1f9dff2c563

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.46.4-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.46.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3dbb711b56d7463443ee5a3c0a694531f418c6daa7065efc74553fa3e7b4bb4b
MD5 4db9e9ea92033f333864198bb0c5268d
BLAKE2b-256 6de34d1ea11edd4562ff477bcd4aa565c9813220b9e684abd398bcd4ff3fa498

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.4-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1dcafc6f8c8a5af059fa22dc68754e32f27731ba6f6f68427bf94351e3b74bb1
MD5 88ce22fb6135ac03920161cba78438ab
BLAKE2b-256 ba25f36f6fd9bb4ab87db356f574c427af7b11a08c7d82ced1cd9a5c3b9c9e21

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.4-cp311-cp311-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 c824b5bdc6932542818c2ab41c33a38a20e588305932a86e411b743c5edc34af
MD5 a2e90b248dc7f7f0935feea28ff02c22
BLAKE2b-256 2eefc45650569a5338c6e6b784926180327eabc68ecef7dae101fb007d69f06e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6f856598e48ad8d42063b581851b1e5e4aee879ed61cb38405a3861b98e1c189
MD5 9b96b6e41bbc4725fb74e5f22e9bfa61
BLAKE2b-256 064bdbeaf54153739c185eef62b927f14e5ab8e6a62ef9b9c5f9c1d6461fd1ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.4-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b406ccce54948fb9f509534ff6dac9b05be0d62f5a9b91a04993919c5c35fa37
MD5 cf8e6ab0176beaf89aa941c5e0aa4ec0
BLAKE2b-256 5aaaca80503911731775ad9a9da4816247f874addde16c32ac45dfaaaa65125e

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