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.3.tar.gz (15.6 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.3-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: smartapi_cli-0.1.3.tar.gz
  • Upload date:
  • Size: 15.6 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.3.tar.gz
Algorithm Hash digest
SHA256 3d3f21a7c72293ba6baed60395550851ab7984b502d3ff4964a0a9a76cc0f4d5
MD5 c7c12c2a8fbc0246e959678c7c75395a
BLAKE2b-256 fff5e5c83840b83363d4469d618f4543ae63e09613232690f0a36635f278be29

See more details on using hashes here.

File details

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

File metadata

  • Download URL: smartapi_cli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 29.9 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 922766830bd50ecc1f2a5bb6c456e2dbb2b9bb5cbd69f67feb2a57798c99e60d
MD5 51201fc32bfa125e6a26dd902548590a
BLAKE2b-256 4b02ad9625a3058888281b2883cce632cc5e82fb9f958e8a4f0a8a04b931ac3c

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