A unified file-system-like storage API with Redis and local filesystem backends
Project description
redis-fs
A unified file-system-like storage API with Redis and local filesystem backends.
Features
- Unified API: Same interface regardless of backend
- Async-first: Built on
asyncio - Flexible backends: Local FS, Redis, or both
- Automatic sync: Mirror Redis changes to local filesystem
- Bulk operations: Upload/download entire directory trees
- Upstash support: Works with Upstash Redis for serverless
Installation
# With uv (recommended)
uv add redis-fs
# With pip
pip install redis-fs
Quick Start
import asyncio
from redis_fs import RedisFs
async def main():
# Filesystem only
async with RedisFs(fs_root="/tmp/data") as rfs:
await rfs.write_text("hello.txt", "Hello, World!")
content = await rfs.read_text("hello.txt")
print(content)
# Redis only
async with RedisFs(redis="redis://localhost:6379", redis_prefix="myapp") as rfs:
await rfs.write_text("config.json", '{"debug": true}')
# Both with sync
async with RedisFs(
redis="redis://localhost:6379",
redis_prefix="myapp",
fs_root="/tmp/data"
) as rfs:
await rfs.start_sync()
await rfs.write_text("data.txt", "Synced!")
await rfs.stop_sync()
asyncio.run(main())
Documentation
See the full documentation for:
License
MIT License - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
redis_fs-0.1.0.tar.gz
(10.5 kB
view details)
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
redis_fs-0.1.0-py3-none-any.whl
(12.4 kB
view details)
File details
Details for the file redis_fs-0.1.0.tar.gz.
File metadata
- Download URL: redis_fs-0.1.0.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Pop!_OS","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc7ab7fe8627d6ac6d0ab4be17b9e5a2f847df4e05ca4c746c6e9678d37f5b08
|
|
| MD5 |
8249e5c35e846ad2bde322b44575a117
|
|
| BLAKE2b-256 |
ab1c5ef8d2e583bd21e2bde6e58f8a74c43905a505f78a90ed8fb0b6d9140499
|
File details
Details for the file redis_fs-0.1.0-py3-none-any.whl.
File metadata
- Download URL: redis_fs-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Pop!_OS","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f710597e5481a67ee216c6df0cbc7a9dca9660792719d20995ac6762735a3fc1
|
|
| MD5 |
8d1d5bfe251e56a33d664f30c6af7e3c
|
|
| BLAKE2b-256 |
54c60916dd3a7908a1bd24979af8c28ccaf298d0e7ec19e69e6b80df1e094274
|