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.0.tar.gz (8.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.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: smartapi_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 8.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.0.tar.gz
Algorithm Hash digest
SHA256 b68651f1afa27374e30b845e9e284aff0bde10bf0c53f9468a3acb4db229a29e
MD5 a10b1ee5c751f2be3889fc8c9923157c
BLAKE2b-256 d8454651da7b856a05bcb88dd7eec36f97da79e52d05f03619fb5c414fce2cf5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: smartapi_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f95bef6df1088955f1b3117991b4585959e739b2e7eccf47b4a6f48409760756
MD5 f35cd389713fcc0932a2ab6b71b48476
BLAKE2b-256 e301f5d549ba14e2fa052e7443905b1165bc309faffe1a74600531a18dfa03dc

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