Metadata-Version: 2.4
Name: fullapi
Version: 1.1.0
Summary: FastAPI project scaffolder — zero dependencies, one command.
Author: Sahil Nayak
Maintainer: Sahil Nayak
License: MIT
Project-URL: Homepage, https://github.com/sahilnyk/fullapi
Project-URL: Repository, https://github.com/sahilnyk/fullapi
Keywords: fastapi,scaffold,cli,generator,fullapi
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

<div align="center">

# 🕊️ fullapi

**FastAPI project scaffolder — one command, full stack**

[![PyPI](https://img.shields.io/pypi/v/fullapi?color=009688)](https://pypi.org/project/fullapi/)
[![Python](https://img.shields.io/pypi/pyversions/fullapi?color=009688)](https://pypi.org/project/fullapi/)
[![License](https://img.shields.io/github/license/sahilnyk/fullapi?color=009688)](LICENSE)
[![Downloads](https://img.shields.io/pypi/dm/fullapi?color=009688)](https://pypi.org/project/fullapi/)

</div>

## Quick Start

```bash
pip install fullapi
fullapi new my_api --preset production
cd my_api && pip install -r requirements.txt
uvicorn main:app --reload
```

Visit `http://localhost:8000/docs` for auto-generated API documentation.

### With Infrastructure

```bash
fullapi new my_api --full --db postgresql --docker --terraform
cd my_api
pip install -r requirements.txt
fullapi docker build
fullapi docker push
fullapi terraform apply
```

## Commands

```bash
# Interactive mode
fullapi new my_api

# Use a preset
fullapi new my_api --preset production

# Add components
fullapi add router Product
fullapi add model Order

# Check project health
fullapi doctor

# List presets
fullapi preset list

# Terraform operations
fullapi terraform init
fullapi terraform plan
fullapi terraform apply
fullapi terraform destroy

# Docker operations
fullapi docker build
fullapi docker push

# Scaling
fullapi scale up
fullapi scale down
fullapi scale set medium
fullapi scale status
```

## Presets

| Preset | Description |
|--------|-------------|
| `production` | Full setup: PostgreSQL + auth + Docker + Redis + middleware + logging |
| `microservice` | Lightweight: SQLite + Docker + middleware + logging |
| `docker-ready` | Full mode with PostgreSQL + Docker + logging |
| `minimal` | Bare essentials, nothing else |

Create custom presets in `~/.fullapi/presets.json`

## CLI Flags

```bash
fullapi new my_api [OPTIONS]

OPTIONS:
  --basic              Minimal structure
  --full               Production-ready structure
  --db TYPE            none | sqlite | postgresql | mysql
  --auth               JWT authentication
  --docker             Docker + docker-compose
  --redis              Redis caching
  --middleware         CORS, rate limiting, security headers
  --logging            Structured logging
  --terraform          Terraform infrastructure (AWS, GCP, Azure)
  --template PATH      Custom template directory
  --preset NAME        Use a preset configuration
```

## Features

**Zero Dependencies** — Pure Python stdlib  
**Instant Setup** — Complete project in seconds  
**Production Ready** — Auth, Docker, DB migrations, caching  
**Cloud Infrastructure** — Terraform for AWS, GCP, Azure  
**Container Ops** — Build and push Docker images  
**Auto Scaling** — Scale infrastructure with simple commands  
**Extensible** — Add routers/models to existing projects  
**Health Checks** — `fullapi doctor` validates structure  
**Presets** — Save common configurations  
**Custom Templates** — Bring your own boilerplate  

## What Gets Created

### Basic Mode
```
my_project/
├── main.py
├── routers/health.py
├── schemas/base.py
├── core/config.py
├── requirements.txt
└── .fullapi.json
```

### Full Mode (--db postgresql --auth --docker --terraform)
```
my_project/
├── main.py
├── routers/
│   ├── health.py
│   └── users.py
├── models/user.py
├── schemas/user.py
├── crud/user.py
├── core/
│   ├── config.py
│   └── security.py
├── db/session.py
├── alembic/
│   ├── env.py
│   └── versions/
├── terraform/
│   ├── main.tf
│   ├── variables.tf
│   ├── outputs.tf
│   ├── terraform.tfvars
│   └── README.md
├── tests/test_main.py
├── Dockerfile
├── docker-compose.yml
├── requirements.txt
├── .env.example
└── .fullapi.json
```

## Examples

```bash
# Start with a preset
fullapi new api --preset production

# Customized setup
fullapi new api --full --db mysql --auth --redis --middleware

# Basic API
fullapi new api --basic

# With cloud infrastructure
fullapi new api --full --db postgresql --docker --terraform

# Custom template
fullapi new api --template ./my_template
```

## Infrastructure Management

Deploy your FastAPI app to AWS, GCP, or Azure with built-in Terraform support:

```bash
# Create project with infrastructure
fullapi new myapi --full --db postgresql --docker --redis --terraform

# Build and push Docker image
cd myapi
fullapi docker build
fullapi docker push

# Deploy to cloud
fullapi terraform init
fullapi terraform plan
fullapi terraform apply

# Scale resources
fullapi scale up              # Increase instance size
fullapi scale down            # Decrease instance size
fullapi scale set large       # Set specific size
fullapi scale status          # View current configuration

# Destroy infrastructure
fullapi terraform destroy
```

**Supported Cloud Providers:**
- AWS (ECS Fargate, RDS, ElastiCache, ECR)
- Google Cloud (Cloud Run, Cloud SQL, Memorystore, Artifact Registry)
- Azure (Container Apps, Azure Database, Azure Cache, ACR)

**Cost-Optimized Defaults:**
- Small: 1 vCPU, 2GB RAM (~$10-15/month)
- Medium: 2 vCPU, 4GB RAM (~$25-35/month)
- Large: 4 vCPU, 8GB RAM (~$60-80/month)

## Contributing

1. Keep it stdlib only — no new dependencies
2. Test your changes: `pip install -e . && fullapi new test_project --full`
3. One feature per PR

## License

MIT License — see [LICENSE](LICENSE)

**Created by** [Sahil Nayak](https://github.com/sahilnyk)
