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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.14macOS 10.13+ x86-64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.13+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.13+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

File metadata

  • Download URL: oxenai-0.48.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.48.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 855715a1d9f63f62c8454bc4e4039e153124f4bacfbf15539c49e2314227b538
MD5 55fdb084d24e17d2eb5a0db6d01a1d3a
BLAKE2b-256 efe6a4d823954c32071d0085d2679bf828237d13a32996d6c7f627adaced051c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.0-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 59ca41633ed0c517de9a6f9fcb1fb6ab6dc5b0adbcc1bb3c799633efd2d25610
MD5 454193cd3c7ed1fee235705babc3aa9c
BLAKE2b-256 93cdcc3668423e83889607f60881058809bfdab385751a414c715f17608f41bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.0-cp314-cp314-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 ed11fda5ce9cca7ba528ae9145b01acd296ff6028a3bbeafd849a3ea7dc81e32
MD5 ec8d983c4760b8da35fac0c466a2ca8e
BLAKE2b-256 04d05ca024edfd21c7c96e6c2c7d3d7955e9e688cbf0c68cfab3e39e8613ce27

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 842c47aee3b5dcff0864d2597d37da992798d3b58fe25e8d7f995c48d247d6ee
MD5 3396cc5759ea502e664ca9acc294c04b
BLAKE2b-256 56923a8f041aed749188104e1a29410bae9b5755de83659f4571804201e5154f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.0-cp314-cp314-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 29fb1f897e4e94b3ad5993da19a79aa9251fc790df2b1146d6e48f81e1a8fe89
MD5 788c542a44c5bb15d647bb29a739d879
BLAKE2b-256 3855f38423c85b65088b80269d2923db8f88b7bf258bc4b7db116f1acd840322

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.48.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.48.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8b3747da664340df3890a36645c59e26c545dc51ccbf2082bd19317fa9853f88
MD5 8bdd78c762186b8917e07be23bf0b1b1
BLAKE2b-256 50f4b4c283cda27da87b5e67ae6ab19b8131ae22ee13fe1e0b18194003eb1087

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 be78ca7a7d79f612340f270ec9ad4f94c627c747fd8f1352e55424b9661cccd2
MD5 a9a32719ba4b1d130b991aa2e72a142a
BLAKE2b-256 51848e64c249737b50c91662f9b02e2ead751cf4bf13bf97b6ee976be6a6362f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.0-cp313-cp313-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 350c9e4b6c4be90fbb7c3943fb518f1727b64fd7f77d9511fd5989a0a27eddb7
MD5 7948ca270737a3a1faafb5cc17520761
BLAKE2b-256 79bf01ec2cfc04b48d7b76fd482d1fa0a3765da51b7da0c29b00614530d38437

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 744e4adf6df3b852a75ec7609af0dd67b3c2db003680da164c4b3b11ecc26919
MD5 b2436c81a73c3944fab08b9c5def93e3
BLAKE2b-256 3cb9f11913ffef31a9aeefb60d7565621d4d73e25a2fd3bca2d108141c5f77c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 2780334d2e9135c1838eb8bf06f0c313ee4b22815f07b162417c972ead788958
MD5 e8ab5f9773036969bd77ebd0d6139018
BLAKE2b-256 71ac6bf221e0610ad2e862fd97e3743ae363552e0b15462070eb187c175e3f5f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.48.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.48.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6d7b0ea58c1589a44b335020603fc4a1f186def3f88fb7698d0b699483a8da90
MD5 a9179b7bf4204006c5d72e2654ffb523
BLAKE2b-256 a106d49543eca55526d3bf83fcfc79198a421cf4ed4a90f39f3458860d883d94

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 cbb29e98dafa236382cf74bfc7a8032ed09fffce6609eed88d11122665cacdf9
MD5 239b719c36d2dac4f4908a6e8d9c6d4d
BLAKE2b-256 bda0cfe74eeb5115d5b70512310076c70ff85172b97714532fe129621b0630e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.0-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 a1d8e493c0102c804969cf9a9f201b7f31e13bd99ff42e6ff3b2275b6ecf9bd5
MD5 c7e23897001d42f3b30396ebb5b57d51
BLAKE2b-256 4e59e1558f4a21192b45bc2df5a15119143e14d65bd46e565a29632c27e43710

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 328571b74d65197d3790671a2c38e4fcd3a72e07aba92387a60fab4e8bed81f8
MD5 855a3d0f90e3e512dded94323ecc9b9d
BLAKE2b-256 91b96d4f34b2a3952126a9f95ff71369d6168a4c08ae058dd239e4b96a703e2f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 0c29d5ed7b27425343c737b00588693ff2476118be9ccbb8ac4661870fd95a8f
MD5 75ed1288a95cf62fd0b5400302432d75
BLAKE2b-256 2103a58e2812e0968bb0a18fb86d5c7249195780ec8ace64390ff33d762be015

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oxenai-0.48.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.48.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 94e42206500a322a2a8adff03ed4fe3d6888165bba3f6dcc98104a78a211de8b
MD5 65b549aefa40cab91901783c678d2a6e
BLAKE2b-256 849f1adbe84e3091b770ddaed5ad3c8b52f3402ac9b90a071ebb30f8e298a738

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f22d7852afe0bf6d444edb6038c021600178a5a2cd4352611854168431ed487f
MD5 c1a875d66d4e26cd6ea5eecc3fd6fc1a
BLAKE2b-256 fe093c75004bcf31035cf2c0800d74cc93391b4abde7b5bfeb4c936bf6ff5196

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.0-cp311-cp311-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 917997d162910878d7fdb64f43a9ed281f4d02d282d346894fc18c356b90a0b3
MD5 891e38871f9a30c9224ce9a47288a5aa
BLAKE2b-256 00f230aa3819674dfad49173f42230272b1e7253531e061d2f8b7e188fe4f8cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8da1031498ad517f70edf384e87d201381ce3ad5bff6bfeef65e4ea08fc3a584
MD5 2025ffa1ed3da052cb5470ddff9d50da
BLAKE2b-256 82cf74850f95ab3b844a7ed6983dec1a6ccc2cffd7bb771c4bac4d797e0c816e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.48.0-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b218afd8bfc83af88559473e0d9eb5078f13a192a359a1b70da0e8cf6ebd50c7
MD5 ba6f607f049784f16a34189886af09a8
BLAKE2b-256 48a11b570a70a2434e471cefa9b1f2987e1cfcad724e7b820452c415880362fa

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