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


🧱 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.4.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.4-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: smartapi_cli-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 a8253049f6eafcf19c3e1f8d1c5b5763deb1bfa895a41a704f471f2bbd0de6e0
MD5 fb86ca2b06e1f19c2ed1f3309f689308
BLAKE2b-256 06b8f7fdfc9b9383b8da9d3b1a30860ef594f3ce91fc472d7f9bcf1c041f7f24

See more details on using hashes here.

File details

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

File metadata

  • Download URL: smartapi_cli-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e36bc6c46c131d3334189a4f75c5f0dd8656e923c17cbf47854ff9be482ea52a
MD5 a3c1a4cf5cea66873312e61b12528548
BLAKE2b-256 997c73c582adb93b0b72f29453a6f85f7d9094274a7b450bdd29e42af02afd88

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