Skip to main content

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

⚡ 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:


🧱 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

smartapi_cli-0.1.1.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smartapi_cli-0.1.1-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file smartapi_cli-0.1.1.tar.gz.

File metadata

  • Download URL: smartapi_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for smartapi_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f441387fd2408d6a3b63656cc82a60fc2e1554c5f4aa595e8251f809f725635a
MD5 82ac32278fdd6e4a53f9330a373889a1
BLAKE2b-256 24d28398386c8a32b2087c7b523fd0b9259754472559ad3088e933c1417c1071

See more details on using hashes here.

File details

Details for the file smartapi_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: smartapi_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for smartapi_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db94f54260467b9266b59db8475c93f11f77fb3317b1331283055df26ed95e18
MD5 986e805c3d75fcc735071e927b90abe4
BLAKE2b-256 889cfa21cba5e168939027aa0a9dd258af14a527ec95fe47d8b07c80e34511ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page