One unix-flavored filesystem API over any storage: local disk, in-memory,
Azure Data Lake. Python-first, sync and async, sandboxable, fully typed.
Documentation: storix.mghalix.com
Storix puts one unix filesystem interface in front of every storage backend, so
you work with cloud storage the way you already work with local files: ls,
cd, cat, mkdir, mv, rm. The backend can be your disk, an in-memory
store for tests, or Azure Data Lake in production, behind one small, fully typed
API, sync or async. Swap the backend, keep the code.
It is not a plumbing competitor to the cloud SDKs. It is the ergonomic layer over them, the way FastAPI is a layer over the web rather than a new web server.
Install
uv add storix # local filesystem + in-memory
uv add "storix[azure]" # + Azure Data Lake Gen2 (HNS accounts)
uv add "storix[cli]" # + the sx command-line interface
uv add "storix[all]" # all optional features
Quick look
from storix import Storix
from storix.backends import LocalBackend
fs = Storix(LocalBackend('~/storix-data')) # '/' is anchored at ~/storix-data
fs.mkdir('/docs')
fs.echo('hello, storix!', '/docs/readme.txt')
print(fs.cat('/docs/readme.txt')) # b'hello, storix!'
fs.cd('/docs') # a session has a cwd, like a shell
fs.mkdir('/archive')
fs.mv('readme.txt', '/archive') # the last argument is the destination
Async is the same API under storix.aio, generated from the sync source so the
two never drift:
from storix.aio import get_storage
async with get_storage('azure') as fs:
await fs.echo(b'...', '/report.csv')
print(await fs.url('/report.csv', expires_in=600)) # presigned SAS link
Highlights
- Unix semantics, everywhere.
ls/cd/cat/du/mvwith a real session and cwd, identical across local, memory, and cloud. Thecliextra adds ansxshell too. - Python-first and streaming.
echotakesbytes,str, an iterator, or an async iterator, so large files move through bounded memory instead of loading whole. - Composable layers. Sandbox a session (escape-proof chroot), add a read-through cache, or backfill capabilities, all as middleware that wraps any backend.
- Sync and async, one API, generated from a single source and proven by one conformance suite across every backend.
- Typed and safe. Fully typed and
py.typed. Every failure raises a typed error, and a sandbox cannot be escaped, not even by the code inside it.
Full tutorials, task recipes (FastAPI, settings, caching, testing, custom backends), and the API reference live at storix.mghalix.com.
Backends
| Backend | Import | Notes |
|---|---|---|
| Local disk | storix.backends.LocalBackend |
anchored at a base directory |
| In-memory | storix.backends.MemoryBackend |
reference backend, great for tests |
| Azure ADLS Gen2 | storix.backends.AzureBackend |
requires hierarchical namespaces |
Third-party backends implement the small StorageBackend port and register via
register_backend(). See
Write a custom backend.
Migrating from 0.1.x
0.2.0 was a ground-up rework (hexagonal core, generated sync flavor, layers, capabilities). See the migration table in release-notes.md.
License
Apache 2.0. See LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file storix-0.4.2.tar.gz.
File metadata
- Download URL: storix-0.4.2.tar.gz
- Upload date:
- Size: 104.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93f1b4a728271faf1780bcd29b7c24e8228ae0b34c58b13e46eb041d1f8a4bf5
|
|
| MD5 |
b6dac3243f25b714bb9c2a83cb7a3865
|
|
| BLAKE2b-256 |
1e1161e10a915ebbafcadfe7feabcfe78ce9e589da0672df36fcb53f8abcda2b
|
File details
Details for the file storix-0.4.2-py3-none-any.whl.
File metadata
- Download URL: storix-0.4.2-py3-none-any.whl
- Upload date:
- Size: 147.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
344fd35f8507a5b3da7c83b039a5f711ddb678a64738bed4351dc4451b1a41b2
|
|
| MD5 |
c3fd4289b4de413563d3a97e6e4b4902
|
|
| BLAKE2b-256 |
42f0fb812e2150c8a0a0b03fea5ed58a7d04006ca2ab159982ce7afc5b14f137
|