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, andwait_for. Note thatasyncio.waitrequires explicit tasks — wrap withasyncio.create_task(stack.method(...))first. -
read_bytes(address)returns(bytes, Info). -
Use
read_bytes(..., max_bytes=...)for bounded reads ormaterializefor a stable local path. -
Errors are exposed as
ovstorage.Errorsubclasses such asNotFoundError,NoRouteError, andPermissionDeniedError. -
fileis the one built-in Layer kind. Other standard Layers load factories from an explicitPluginRegistryduringStack.build(). Applications may also declare native Python Layers by subclassingLayerBase. -
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. PassStack.build(loop=owned.loop)with anovstorage.OwnedLoopto 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 typedNotConfiguredErrorrather 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.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ovstorage-0.2.1-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details for ovstorage-0.2.1-cp310-abi3-win_amd64.whl |
| ovstorage-0.2.1-cp310-abi3-manylinux_2_34_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.34+ x86-64 | Details for ovstorage-0.2.1-cp310-abi3-manylinux_2_34_x86_64.whl |
| ovstorage-0.2.1-cp310-abi3-manylinux_2_34_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.34+ ARM64 | Details for ovstorage-0.2.1-cp310-abi3-manylinux_2_34_aarch64.whl |
Total release size: 162.7 MB
Release files / ovstorage-0.2.1-cp310-abi3-win_amd64.whl
| Download URL | ovstorage-0.2.1-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 51.0 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a41d4ddca64775a4a5e9ff51e338ccc75d6f81274d0f63566a70af34e652f764
|
|
BLAKE2b-256 checksum How to use checksums |
b62402c570900f962feda40c56aa5478800279d9cfb4c04c120b9df312d5284c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / ovstorage-0.2.1-cp310-abi3-manylinux_2_34_x86_64.whl
| Download URL | ovstorage-0.2.1-cp310-abi3-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 55.8 MB |
| Tags | CPython 3.10 Linux glibc 2.34+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
cada84ed36addd93ed55912a3e2171b3225973de710a1029d2550a2b70f4770c
|
|
BLAKE2b-256 checksum How to use checksums |
565c1b83bc377294c0d36f9ade701aea2e56ee3feb78bac3c6a81a23665b99a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / ovstorage-0.2.1-cp310-abi3-manylinux_2_34_aarch64.whl
| Download URL | ovstorage-0.2.1-cp310-abi3-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 55.9 MB |
| Tags | CPython 3.10 Linux glibc 2.34+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
187d19247f83b86c836440ee508dbbb60238df06dbf48bed0493ad1550598a2a
|
|
BLAKE2b-256 checksum How to use checksums |
85e774d6bc3a49e8428457d763a75619fd87b3a1e3ed7ee4337dc2d68e7fb07f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for ovstorage 0.2.1
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.