Metadata-Version: 2.3
Name: nyxa-storage
Version: 0.1.0
Summary: Batteries-included filesystem disks for Nyxa — local default, optional S3
Keywords: fastapi,storage,filesystem,nyxa
Author: Al-Amin Islam Nerob
Author-email: Al-Amin Islam Nerob <alamin@aincoder.com>
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Dist: nyxa>=0.1.0
Requires-Dist: boto3>=1.34 ; extra == 's3'
Requires-Python: >=3.11
Project-URL: Homepage, https://nyxadev.com
Project-URL: Repository, https://github.com/NyxaDev/nyxa
Provides-Extra: s3
Description-Content-Type: text/markdown

# nyxa-storage — batteries-included disks for Nyxa

Local filesystem disk by default under `{project}/storage/app`. Optional **S3**
via `FILESYSTEM_DISK=s3` (`nyxa-storage[s3]`).

## At a glance

| What you need | Nyxa Storage |
| --- | --- |
| Write to a named disk | `Storage.disk("local").put` |
| Read / check / remove | `.get` / `.exists` / `.delete` |
| Copy / move | `.copy(from, to)` / `.move(from, to)` (same disk) |
| Absolute path for a file | `.path(relative)` → absolute `Path` (S3: synthetic `s3:/bucket/key`) |

## Install

```bash
uv add nyxa-storage
uv add 'nyxa-storage[s3]'   # boto3
```

## Quick start

```python
from nyxa_storage import Storage

disk = Storage.disk("local")
disk.put("notes/hello.txt", "hi")
disk.copy("notes/hello.txt", "notes/hello-copy.txt")
disk.move("notes/hello-copy.txt", "archive/hello.txt")
assert disk.exists("notes/hello.txt")
```

## Configuration

```bash
FILESYSTEM_DISK=local
# STORAGE_ROOT=/absolute/path/to/storage/app

# S3 (or MinIO / R2)
# FILESYSTEM_DISK=s3
# AWS_BUCKET=my-bucket
# AWS_DEFAULT_REGION=us-east-1
# AWS_ACCESS_KEY_ID=...
# AWS_SECRET_ACCESS_KEY=...
# AWS_ENDPOINT_URL=https://...   # optional
```
