Opinionated FastAPI CLI for scalable Python APIs
Project description
🚀 SmartAPI
SmartAPI é um CLI opinativo para criação de APIs modernas e escaláveis com FastAPI.
Ele gera uma API completa do zero, já arquitetada, padronizada e pronta para produção.
✨ O que o SmartAPI entrega
- FastAPI + Uvicorn
- Celery + Redis
- PostgreSQL
- SQLAlchemy + Alembic
- Configuração de ambientes (.env)
- Docker + Docker Compose
- Padrão de módulos, controllers, services e jobs
- CLI para geração de código e automação de tarefas
📦 Instalação
pip install smartapi-cli
⚡ Criando um projeto
Inicializando um projeto na pasta atual:
smartapi init
docker compose up --build -d
A API ficará disponível em:
http://localhost:8000
📚 Documentação automática
FastAPI gera documentação automaticamente:
-
Swagger UI
http://localhost:8000/docs
🧱 Estrutura do projeto
app/
├── core/ Configurações centrais (app, db, celery, env)
├── modules/ Módulos da aplicação
│ └── example/
│ ├── controller/
│ ├── service/
│ ├── model/
│ ├── schemas/
│ └── router.py
├── jobs/ Jobs Celery
└── main.py Entry point FastAPI
alembic/ Migrations
docker/ Dockerfiles
docker-compose.yml
requirements.txt
.env.example
🧩 Comandos disponíveis
smartapi make:module <Module>
smartapi make:controller <Module>
smartapi make:service <Module>
smartapi make:model <Module>
smartapi make:schema <Module>
smartapi make:router <Module>
smartapi make:crud
smartapi make:job
smartapi make:migration
Banco de dados
smartapi db:migrate
smartapi db:rollback
Executar a aplicação
smartapi app run
🧠 Filosofia
- Convenção > configuração
- Código previsível
- Arquitetura modular
- Infra pronta desde o dia 0
- Menos boilerplate, mais produto
📄 Licença
MIT
Criado com ❤️ por Arthur Rezende
Project details
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 smartapi_cli-0.1.5.tar.gz.
File metadata
- Download URL: smartapi_cli-0.1.5.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
869e63ad2feb454d4a486f51051beb2bdbcf959ab77f7a6f686a9970fbced462
|
|
| MD5 |
5c5b23301310e0b013b13b4c487b5317
|
|
| BLAKE2b-256 |
4d2242882a36af7e7778ac15952c90ce8f5e1273f154b44d3bb27956e3c7a1bd
|
File details
Details for the file smartapi_cli-0.1.5-py3-none-any.whl.
File metadata
- Download URL: smartapi_cli-0.1.5-py3-none-any.whl
- Upload date:
- Size: 30.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86c7640c4c9363be82ae8566d22c697024bcab2f955131af9a7b0ee7ff8d2661
|
|
| MD5 |
9037fae5106d6d9fc6ce78b6601088e6
|
|
| BLAKE2b-256 |
ffd68b1f9b8e3d2dd72b4aeb2ad83ca825e7e487d2d828235de8d30a0b34631b
|