Skip to main content

Storix - Storage for Unix lovers.

One unix-flavored filesystem API over any storage: local disk, in-memory,
Azure, S3, GCS. Python-first, sync and async, sandboxable, fully typed.

PyPI version GitHub stars License

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 / S3 / GCS 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]"   # + all of Azure Storage (ADLS Gen2 + Blob)
uv add "storix[s3]"      # + Amazon S3 (r2 / minio alias it)
uv add "storix[gcs]"     # + Google Cloud Storage
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

The sx shell

The cli extra puts the same core behind a command line, one-shot or interactive:

uv add "storix[cli]"

sx                                    # interactive shell (tab completes paths)
sx -p azure ls -l /media              # or a single command, any provider
sx upload ./video.mp4 /media/         # host -> provider, with a progress bar

Listings carry Nerd Font icons and coreutils-style sizes (165M); transfers render progress through the ObservabilityLayer. Preferences and an always-on layer stack persist in ~/.config/storix/config.toml, a project storix.toml, or pyproject.toml:

[tool.storix.cli]
icons = true
provider = 'azure'                          # what sx opens by default
layers = [{ name = "cache", ttl = 300 }]    # every session, read-through

Highlights

  • Unix semantics, everywhere. ls/cd/cat/du/mv with a real session and cwd, identical across local, memory, and cloud.
  • Python-first and streaming. echo takes bytes, 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, emit transfer progress, 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 HNS accounts; the azure provider self-detects the account kind
Azure Blob storix.backends.AzureBlobBackend any account kind, blob API
Amazon S3 storix.backends.S3Backend plus S3-compatible stores (MinIO, R2)
Google Cloud Storage storix.backends.GcsBackend

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

storix-0.4.4.tar.gz (121.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

storix-0.4.4-py3-none-any.whl (166.3 kB view details)

Uploaded Python 3

File details

Details for the file storix-0.4.4.tar.gz.

File metadata

  • Download URL: storix-0.4.4.tar.gz
  • Upload date:
  • Size: 121.1 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

Hashes for storix-0.4.4.tar.gz
Algorithm Hash digest
SHA256 2d142f9ab4666b5f35eda9cd65bde61057f189ae8063ca1e7ea4c7a2f0f8dbd4
MD5 12583c8de2ac272e1e5798d4b9b2d483
BLAKE2b-256 e9341c58f3ed8d60b0fd4c936e9a96a6b28aec46f5cb8c44be23778317e315ba

See more details on using hashes here.

File details

Details for the file storix-0.4.4-py3-none-any.whl.

File metadata

  • Download URL: storix-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 166.3 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

Hashes for storix-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9e2f363dd73979235a4b77a635e468879feaf2f0e5c566a2042cd4aec318c2c2
MD5 9afdb9fbe71c8bc10a6e2da5bc43f56e
BLAKE2b-256 908d8cdae96c7445043b089aca3322b1904e6065dd201e4dd215857364526df2

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.9

2 files

0.4.8

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

This release

0.4.4 This release

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page