Metadata-Version: 2.4
Name: fileshare-sdk
Version: 1.4.0
Summary: Typed Python SDK for iRuneCore anonymous ephemeral file sharing
Author: iRuneCore
License-Expression: MIT
Project-URL: Homepage, https://irunecore.com
Project-URL: Documentation, https://irunecore.com/docs
Keywords: file-sharing,ephemeral,upload,download,httpx
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27

# fileshare-sdk

Python client for [iRuneCore](https://irunecore.com) — anonymous ephemeral file sharing.

- **Default API:** `https://irunecore.com`
- **Plans:** `base` (10 min, free) · `plus` (30 min, free) · `pro` (1 hr, free)
- **Max file size:** 50 MB (server-enforced)

## Install

```bash
pip install fileshare-sdk
# or from a checkout:
pip install -e ./sdk
```

## Quick start

```python
from fileshare_sdk import FileShareClient

with FileShareClient() as client:  # https://irunecore.com
    info = client.info()
    print(info.name, info.max_file_size_bytes)
    for plan in info.plans:
        print(plan.name, plan.label, plan.price_display)

    shared = client.upload("notes.txt", plan="base")
    print(shared.share_url)
    print(shared.expires_at)

    client.download(shared.id, "notes-copy.txt")
    client.delete(shared.id)
```

### Custom server

```python
FileShareClient("http://localhost:8010")
```

### Progress callback

```python
def on_progress(loaded: int, total: int) -> None:
    print(f"{loaded}/{total}")

with FileShareClient() as client:
    client.upload("video.mp4", plan="pro", on_progress=on_progress)
```

## Plans

| Plan | Lifetime | Price |
|------|----------|-------|
| `base` | 10 minutes | Free |
| `plus` | 30 minutes | Free |
| `pro` | 1 hour | Free |

## API methods

| Method | Description |
|--------|-------------|
| `info()` | Server name, limits, plans, capacity |
| `capacity()` | Used / total / available bytes |
| `plans()` | List expiry plans |
| `upload(path, plan=…)` | Upload a file |
| `get(id)` | File metadata |
| `download(id, dest)` | Save bytes to disk |
| `delete(id)` | Delete early |

Network failures raise `FileShareTransportError`; non-2xx API responses raise
`FileShareAPIError` with `status_code` and `detail` attributes.

## REST mapping

```
GET  /api/v1/info
GET  /api/v1/capacity
POST /api/v1/files                    multipart: file, plan
GET  /api/v1/files/{id}
GET  /api/v1/files/{id}/download
DELETE /api/v1/files/{id}
```
