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.2.tar.gz (15.7 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.2-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: smartapi_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 15.7 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.2.tar.gz
Algorithm Hash digest
SHA256 5eb32e2564d855993b98190b99f155ee96eaf6b818819aaf1ee0086d8e1918d4
MD5 c0a86ec5bc9922a04fc721d1f7c27119
BLAKE2b-256 621bb50fccc15a8d4a64082663da86d9dac6b7b2c25acf765d27b055960038a0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: smartapi_cli-0.1.2-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

Hashes for smartapi_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a058c59f9fe05c0ff68f32ae40859a11e4ab1e12e7d9638d633dfdf413ada488
MD5 0b68aa53f3396d8df13c4e88c5a5615d
BLAKE2b-256 61ce084c1b7aad1a0294f16224a9fa45208d0456fc1470ef55846f2f2d9b3c86

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