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

Uploaded CPython 3.14Windows x86-64

oxenai-0.46.12-cp314-cp314-manylinux_2_34_x86_64.whl (50.0 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.14manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

oxenai-0.46.12-cp314-cp314-macosx_10_13_x86_64.whl (47.2 MB view details)

Uploaded CPython 3.14macOS 10.13+ x86-64

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

Uploaded CPython 3.13Windows x86-64

oxenai-0.46.12-cp313-cp313-manylinux_2_34_x86_64.whl (50.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

oxenai-0.46.12-cp313-cp313-macosx_10_13_x86_64.whl (47.2 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

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

Uploaded CPython 3.12Windows x86-64

oxenai-0.46.12-cp312-cp312-manylinux_2_34_x86_64.whl (50.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

oxenai-0.46.12-cp312-cp312-macosx_10_13_x86_64.whl (47.2 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

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

Uploaded CPython 3.11Windows x86-64

oxenai-0.46.12-cp311-cp311-manylinux_2_34_x86_64.whl (50.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

oxenai-0.46.12-cp311-cp311-macosx_10_13_x86_64.whl (47.2 MB view details)

Uploaded CPython 3.11macOS 10.13+ x86-64

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 375e199edfad995e4aa9a68f415e07c52f4403eb968f2d654b98f74833da22eb
MD5 c8192cfd075655f138ce5d8fdbb9d011
BLAKE2b-256 13b75067d817de98bf6e2b3826daabd04c09059aea42da56ddad8efff0821cfb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d97e8fb43911c71e02b077d7218eb52d9aa49307735104a06a0b8623512f41c9
MD5 6e4830381a8eb7cad6f8ff8cb2a759f1
BLAKE2b-256 0a07cc3101e664fda19499174c6a2a8b2d9ccd344e44379fb5e6f75a8c189c0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp314-cp314-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 13a83276bdabe1024334977099b841dd89b75e0a67a3cfe8b69f3cb44b317cd3
MD5 0f518afebf79df6d4b4f76b575dd2667
BLAKE2b-256 915b2f15dcd1d290901e173c1d66e8fd849449ad09af5a81972b1d7aa1e255b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 18c5134c7dea0a09e014a8585bb26802f80bd052f2bd13c61bcae3d6417ad238
MD5 fe5451875edd5ca0354e166151b676a1
BLAKE2b-256 7672679606b82448d9b21e05bcac021d18e5a9644721e2dd1937912f22b085bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp314-cp314-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 46cdd6b172c05798f5b5d14c1d9a56dc0039c4a0967e074fb9b8a767790096d3
MD5 28839ceb02fe6f35cd88cdae08099cc9
BLAKE2b-256 fac6f76b6b31022724ff551bef9287213ae5722fb9ba260db825b4154a18db03

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9bde00266b3c9fa749ced686a31e9d747866f5bf12d1b7c69b41d478fea66485
MD5 a87ad8eea516d4b470d73a51363fd694
BLAKE2b-256 33ac39667986594020cc5b55ecf753b385152db68f298cdad42ba7f9ddb62939

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 bb75908bd75b4caa23e86ec6df2a0123e2f27962bb53368a0d0d844bf4074751
MD5 4db3095dc475d9d16829d6d835a0978c
BLAKE2b-256 138b7e181a4f5bb6a1497bc84cec79525490b08ab8d4dda5f7c5e519dac00c30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp313-cp313-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 f2ae8dde3557de8e7469728609fd01a94542f2886bcc001a13a03293ecc366df
MD5 0ae4c00e50b18eb9943733a7aed1c9fa
BLAKE2b-256 5cc524e4adcbcd86275a1f7afe825631db129251d39fa4d991216e7a48cf48c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5030acdf97e38102c2a1f98ec29597662d91c9564c33c04e6d005b7ab8a3ba90
MD5 e37176a3563383e899f693e168083b46
BLAKE2b-256 b28b66775007c626db93c4f0bcc0f4936b63f9cc015ea227750b6b09f3d755ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 5202c27ec1dae1675e6b525d2330b048267954df2a32976ee8197211df1e6bf1
MD5 f5ecf93afb0ed494b49604dc4dd32633
BLAKE2b-256 dc41b3bf9c01f2cedc73b2826b6b91c3aa3334d364e7002635da53323f101111

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4de1e86c8e00766f158a504ff25f0a8fc76ed112d323f6d59c07daaca3319056
MD5 8702e2393e0f7dc2cdc6ce54e45f149b
BLAKE2b-256 dfb8026da1935f9a7aeba77c702caa14879af8ee8e94f3a4400e9b528b3138b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 dc6b9539c3011a3b89a6d0a1f35b3c543b3416aaea3ce38116f75eb2410ee074
MD5 43e346610265c4eeefb8a22dcb04f917
BLAKE2b-256 c3bf114ce93d2e9354c68472973021a324b9598ae8690b4bb6c8504081518cba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 8c4b983f8c9e577ff4159f9abe95e5097e857098660946d8d005db0f02507881
MD5 d521a6b0b99d4db9db00864dba2327ee
BLAKE2b-256 02bd463fd4d55b8ba79e50af48b02fd678cd8367cbd3e99fa7a1c1a2f8637883

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c974f16cad8d5ba749ec204690794a5efd0297658d6298a9cef71fdc03893c16
MD5 284da54296ab3b2340f050242e0c5aaa
BLAKE2b-256 9247ffa31bbe13ef205e26239bf4d33a6047e20b3e5f8ba939a3c19cb7597e58

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 e5cad83af6867f3c5b08959851c81c1921c3f4478b3f2a2af57ecf2f6df86e35
MD5 223d56b5187f6c551e345d2088e2bb2b
BLAKE2b-256 927461a431ea099e42a5900402e553adb2f5d43588a2b9e29946abe679997343

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 cab94d308b6b0ecbb6ed03c3931234f99b0fb86ff55850ca0855c22896f41a6b
MD5 358620d841a8023e0243651f02886e26
BLAKE2b-256 1d627cbc1fe3b3384490ab3140975a050547c1d522e0d2bd90b9a2e4719f948e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1add942e47235ead1e4e48ea3b9934539ed57ade096e8313537e0923d195949a
MD5 0d209e1c903227055c7535a62ee66b4b
BLAKE2b-256 868276e7fbbc8e5bad9f9929105e43f915774597092d33050660562468cc60e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp311-cp311-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 c1ecf5e9e82ef04409e8edc6cb7399e44d01dbe0174361e83edb6810524d331e
MD5 44951f6a49689acd6f59a6c1d783fcef
BLAKE2b-256 926c79f6fc4cb6e7c5e0faf6201f13765864854fb5f5ac3d577718284d4a9c50

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7f01204c091b4dc67646499891c5823eaba1cde54c160bb020197a64b4db3248
MD5 68cf98d645f82e43bd40635b9f9288cf
BLAKE2b-256 b870d0776ab508ef8501f16cb194926215d008e8816b0276befc59d97c9f311a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for oxenai-0.46.12-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 43f74ec5e6e16db67575fd0bbd930bf532502c401fe4f41ad411962c3c29505b
MD5 909d3c998b65be30ec894f37f59b7c8f
BLAKE2b-256 de4e69db78f7392b92678d6740f4b4202d7f39e3405534006d1aa79c70bea67a

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