Dynamic API generator from JSON models with automatic schema inference.
Project description
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:
pip install autorestify
With uvicorn server:
pip install autorestify[server]
Or install locally for development:
git clone https://github.com/MikaelMartins/autorestify.git
cd autorestify
pip install -e .
pip install uvicorn
⚡ Quick Example
from fastapi import FastAPI
from autorestify.api.router_factory import create_router
app = FastAPI()
app.include_router(create_router())
Start the server:
uvicorn main:app --reload
📤 Uploading a collection
Send a JSON payload to the upload endpoint to register a new collection and its documents.
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:
pytest -v
Run with coverage reporting:
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
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autorestify-1.0.2.tar.gz.
File metadata
- Download URL: autorestify-1.0.2.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c5526e4ddcfb72a5eab73c6d84cb28fbeb1c62c35a8f276b95290a7359d15fe
|
|
| MD5 |
5d3c2557d687aca70e0d082355a2f426
|
|
| BLAKE2b-256 |
73455aea549456d0bbb4770ff2a0ed066e3333c116368dc4359666ef562bd003
|
File details
Details for the file autorestify-1.0.2-py3-none-any.whl.
File metadata
- Download URL: autorestify-1.0.2-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b1d274b53b8ca321ee4b30bfe32fda7003f7fe95f2b6dea4ce16540490de080
|
|
| MD5 |
92f3a988ba62e4022fcc5a6c6466ea93
|
|
| BLAKE2b-256 |
01a7eec536687c69169df65003eeb03928f9039ebafa76b8bb4e589bebeb044c
|