Skip to main content

ovstorage

ovstorage is an async Python binding for the ovstorage portable storage library. It gives applications one API for object I/O across storage backends registered through ovstorage plugins.

The package is pre-1.0. The API is usable, but compatibility guarantees are still settling.

Install

pip install ovstorage

The wheel includes the Python extension package, py.typed, package plus per-layer type stubs for Python 3.10 and newer, and the first-party plugin libraries: S3, GCS, Azure, Nucleus, HTTP, OpenDAL, broker, the Omniverse storage service client, and the core and cache Layer families. pip install ovstorage is enough to use any of them.

The libraries ship in the wheel, but nothing loads implicitly. Reach them with ovstorage.bundled_plugins_dir() and hand that to a PluginRegistry:

registry = ovstorage.PluginRegistry([ovstorage.bundled_plugins_dir()])
stack = await (
    ovstorage.Stack(root="s3")
    .with_registry(registry)
    .backend(ovstorage.plugin.PluginBackend("s3"))
    .build()
)

Quick Start

import asyncio
import tempfile
from pathlib import Path

import ovstorage


async def main() -> None:
    with tempfile.TemporaryDirectory() as tmp:
        root = Path(tmp)
        request = ovstorage.ConnectionRequest("file")
        request.add_config("root", ovstorage.ConfigValue.string(str(root)))
        storage = await (
            ovstorage.Stack(root="files")
            .backend(ovstorage.file.FileBackend("files"))
            .connection("files", request)
            .build()
        )

        address = (root / "hello.txt").as_uri()
        await storage.write(address, b"hello from ovstorage")

        data, info = await storage.read_bytes(address, max_bytes=1024)
        print(data.decode("utf-8"))
        print(info.size)


asyncio.run(main())

Notes

  • The Python API is async-first. Long-running layer methods return coroutines compatible with asyncio.create_task, gather, and wait_for. Note that asyncio.wait requires explicit tasks — wrap with asyncio.create_task(stack.method(...)) first.

  • read_bytes(address) returns (bytes, Info).

  • Use read_bytes(..., max_bytes=...) for bounded reads or materialize for a stable local path.

  • Errors are exposed as ovstorage.Error subclasses such as NotFoundError, NoRouteError, and PermissionDeniedError.

  • file is the one built-in Layer kind. Other standard Layers load factories from an explicit PluginRegistry during Stack.build(). Applications may also declare native Python Layers by subclassing LayerBase.

  • A stack with Python layer bodies captures the asyncio loop it is built on and dispatches those bodies there. By default that is the loop Stack.build() was awaited on. Pass Stack.build(loop=owned.loop) with an ovstorage.OwnedLoop to run those bodies on a producer-owned loop instead, so the stack can be driven from threads that are not running an asyncio loop. That loop must stay alive for the life of the stack (and of any handle exported from it); once it stops, operations fail with a typed NotConfiguredError rather than hanging:

    with ovstorage.OwnedLoop() as owned:
        stack = await ovstorage.Stack(root="leaf").backend(leaf).build(
            loop=owned.loop
        )
        data, info = await stack.read(address)
    

More Information

Metadata

Release files for ovstorage 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for ovstorage 0.3.0
File Interpreter ABI Platform Actions
ovstorage-0.3.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for ovstorage-0.3.0-cp310-abi3-win_amd64.whl
ovstorage-0.3.0-cp310-abi3-manylinux_2_34_x86_64.whl CPython 3.10 abi3 Linux glibc 2.34+ x86-64 Details for ovstorage-0.3.0-cp310-abi3-manylinux_2_34_x86_64.whl
ovstorage-0.3.0-cp310-abi3-manylinux_2_34_aarch64.whl CPython 3.10 abi3 Linux glibc 2.34+ ARM64 Details for ovstorage-0.3.0-cp310-abi3-manylinux_2_34_aarch64.whl

Total release size: 193.2 MB

Release files / ovstorage-0.3.0-cp310-abi3-win_amd64.whl

Download URL ovstorage-0.3.0-cp310-abi3-win_amd64.whl
Size 60.5 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
149a9fece5fc4a48ce18846acdb0d815778fe6fb62ca9719820278ef38eaf421
BLAKE2b-256 checksum
How to use checksums
ead269bb2e7b8176213122baa54aaa350ef614f4d9f447a59e74ac0ac263884d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / ovstorage-0.3.0-cp310-abi3-manylinux_2_34_x86_64.whl

Download URL ovstorage-0.3.0-cp310-abi3-manylinux_2_34_x86_64.whl
Size 66.4 MB
Tags CPython 3.10 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
59bfd5d9382d9615a75a10f505ce9adb88b51766fecd861d3da7b1a597b2ea15
BLAKE2b-256 checksum
How to use checksums
db92c4b66bf2dbe67263366e5ba0b4750b906bd9b48595cbbdfb7995a482d1e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / ovstorage-0.3.0-cp310-abi3-manylinux_2_34_aarch64.whl

Download URL ovstorage-0.3.0-cp310-abi3-manylinux_2_34_aarch64.whl
Size 66.2 MB
Tags CPython 3.10 Linux glibc 2.34+ ARM64 abi3
SHA-256 checksum
How to use checksums
e7e4bdcd25256c8e5b8f06eed2fd8807c3ce25b52f35d56bbe87f9d56fc7840d
BLAKE2b-256 checksum
How to use checksums
01f7ddb5bb88c2322d78e44479e0440cb55b2c58a6e2a6f1d6c68121aacc37eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for ovstorage 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page