Metadata-Version: 2.4
Name: redis-fs
Version: 0.1.0
Summary: A unified file-system-like storage API with Redis and local filesystem backends
Keywords: redis,filesystem,storage,async
Author: Yaakov Belch
Author-email: Yaakov Belch <git-commit@yaakovnet.net>
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Framework :: AsyncIO
Classifier: Topic :: Database
Classifier: Topic :: System :: Filesystems
Requires-Dist: redis>=5.0.0
Requires-Dist: pytest>=8.0.0 ; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24.0 ; extra == 'dev'
Requires-Dist: testcontainers[redis]>=4.0.0 ; extra == 'dev'
Requires-Dist: mkdocs>=1.6.0 ; extra == 'docs'
Requires-Dist: mkdocs-material>=9.5.0 ; extra == 'docs'
Requires-Dist: upstash-redis>=1.0.0 ; extra == 'upstash'
Requires-Python: >=3.11
Provides-Extra: dev
Provides-Extra: docs
Provides-Extra: upstash
Description-Content-Type: text/markdown

# 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

```bash
# With uv (recommended)
uv add redis-fs

# With pip
pip install redis-fs
```

## Quick Start

```python
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](https://yaakovb.github.io/redis-fs/) for:

- [Usage Guide](https://yaakovb.github.io/redis-fs/usage/)
- [Testing](https://yaakovb.github.io/redis-fs/testing/)
- [Build & Publish](https://yaakovb.github.io/redis-fs/publishing/)
- [API Reference](https://yaakovb.github.io/redis-fs/api/)

## License

MIT License - see [LICENSE](LICENSE) for details.
