Metadata-Version: 2.4
Name: autorestify
Version: 1.0.2
Summary: Dynamic API generator from JSON models with automatic schema inference.
Author: Mikael Aurio Martins
License: MIT
Project-URL: Homepage, https://github.com/MikaelMartins/autorestify
Project-URL: Repository, https://github.com/MikaelMartins/autorestify
Project-URL: Issues, https://github.com/MikaelMartins/autorestify/issues
Keywords: fastapi,dynamic-api,sqlalchemy,schema,automation
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: FastAPI
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.110.0
Requires-Dist: sqlalchemy>=2.0.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: server
Requires-Dist: uvicorn>=0.27.0; extra == "server"
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: httpx>=0.27.0; extra == "dev"
Requires-Dist: coverage>=7.0.0; extra == "dev"
Requires-Dist: black>=24.0.0; extra == "dev"
Requires-Dist: ruff>=0.3.0; extra == "dev"
Requires-Dist: mypy>=1.8.0; extra == "dev"
Dynamic: license-file

# AutoRESTify

**The High-Performance Runtime Engine for Persistent REST APIs.**

AutoRESTify is an execution engine that transforms JSON collections into complete, persistent, and secure REST APIs. Unlike static code generators, AutoRESTify manages the data lifecycle in real time.

---

## 🚀 Features

- Dynamic route generation
- Automatic schema inference
- SQLite persistence (production-ready)
- Proper in-memory test isolation
- Pluggable security architecture
- Full CRUD support
- Conexão SQLAlchemy (PostgreSQL, MySQL, SQLite, ...)
- CI with GitHub Actions

---

## 📦 Installation

Install from PyPI:

```bash
pip install autorestify
```

With uvicorn server:

```bash
pip install autorestify[server]
```

Or install locally for development:

```bash
git clone https://github.com/MikaelMartins/autorestify.git
cd autorestify
pip install -e .
pip install uvicorn
```

---

## ⚡ Quick Example

```py
from fastapi import FastAPI
from autorestify.api.router_factory import create_router

app = FastAPI()

app.include_router(create_router())
```

Start the server:

```bash
uvicorn main:app --reload
```

---

## 📤 Uploading a collection

Send a JSON payload to the upload endpoint to register a new collection and its documents.

```http
POST /upload
Content-Type: application/json

{
  "collection": "clientes",
  "documents": [
    {"name": "Ana", "age": 30},
    {"name": "Carlos", "age": 25}
  ]
}
```

Once uploaded, the following routes are created automatically for the `clientes` collection:

```
GET    /clientes
GET    /clientes/{id}
POST   /clientes
PUT    /clientes/{id}
DELETE /clientes/{id}
```

---

## 🧠 Architecture Overview

AutoRESTify is built with:

- FastAPI
- SQLAlchemy
- Modular router factory
- Dynamic schema engine
- Pluggable security layer

Core modules:

```
autorestify/
  api/
  core/
  storage/
  schema/
  security/
```

---

## 🧪 Running Tests

Run the test suite:

```bash
pytest -v
```

Run with coverage reporting:

```bash
pytest --cov=autorestify --cov-report=term-missing
```

---

## 🔐 Security

Security is pluggable. Implement a custom authentication provider by extending the security interface and inject it into the router factory.

---

## 🛠 Development Setup

```bash
python -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
pytest -v
```

---

## 🗺 Roadmap

- Filtering support
- Pagination
- Ordering
- Async storage engine
- RBAC
- Multi-tenant architecture

---

## 📜 License

MIT License

---

## 👨‍💻 Author

Mikael Aurio Martins — Software Developer
