Metadata-Version: 2.4
Name: tinyfiledb
Version: 0.1.0
Summary: A lightweight file-based database for Python projects.
Author-email: Your Name <you@example.com>
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# tinyfiledb

A lightweight file-based database for Python projects. No server, no migrations, no dependencies — just a local JSON file and a simple API.

## Install

```bash
pip install tinyfiledb
```

## Usage

```python
from tinyfiledb import FileDB

db = FileDB("mydata.json")

# Insert a record
user_id = db.insert({"name": "Alice", "role": "admin"})

# Get, update, list, delete
print(db.get(user_id))
db.update(user_id, {"role": "superadmin"})
print(db.all())
db.delete(user_id)
```

## API

- `insert(record)` — add a record, get back an auto-generated ID
- `get(id)` — retrieve one record by ID (returns `None` if not found)
- `all()` — return every record as a dict
- `update(id, data)` — merge data into an existing record; returns `True` if found
- `delete(id)` — remove a record; returns `True` if found

## License

MIT
