Metadata-Version: 2.4
Name: boostapi
Version: 0.1.0
Summary: Production FastAPI starter toolkit with Redis, SQLAlchemy, JWT Auth, and CLI scaffolding
Project-URL: Homepage, https://github.com/dhinakaran/boostapi
Project-URL: Documentation, https://boostapi.readthedocs.io
Project-URL: Repository, https://github.com/dhinakaran/boostapi
Project-URL: Bug Tracker, https://github.com/dhinakaran/boostapi/issues
Project-URL: Changelog, https://github.com/dhinakaran/boostapi/blob/main/CHANGELOG.md
Author-email: Dhinakaran <dhinakaranthangaraj198@gmail.com>
License: MIT
Keywords: async,embeddings,fastapi,nlp,pgvector,postgresql,redis,semantic-search,sqlalchemy,vector-search
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: alembic>=1.13.0
Requires-Dist: asyncpg>=0.29.0
Requires-Dist: click>=8.1.0
Requires-Dist: fastapi>=0.115.0
Requires-Dist: loguru>=0.7.0
Requires-Dist: passlib[bcrypt]>=1.7.4
Requires-Dist: pydantic-settings>=2.8.0
Requires-Dist: python-jose[cryptography]>=3.3.0
Requires-Dist: python-multipart>=0.0.9
Requires-Dist: redis[hiredis]>=5.0.0
Requires-Dist: sqlalchemy[asyncio]>=2.0.0
Requires-Dist: uvicorn[standard]>=0.30.0
Provides-Extra: dev
Requires-Dist: aiosqlite>=0.20.0; extra == 'dev'
Requires-Dist: black>=24.0; extra == 'dev'
Requires-Dist: httpx>=0.27; extra == 'dev'
Requires-Dist: mypy>=1.11; extra == 'dev'
Requires-Dist: pre-commit>=3.7.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.6.0; extra == 'dev'
Requires-Dist: types-passlib>=1.7.7; extra == 'dev'
Provides-Extra: docker
Requires-Dist: docker>=7.0.0; extra == 'docker'
Provides-Extra: ml
Requires-Dist: numpy>=1.26.0; extra == 'ml'
Requires-Dist: sentence-transformers>=3.0.0; extra == 'ml'
Description-Content-Type: text/markdown

# 🛠️ BoostAPI

<p align="center">
  <strong>Production-ready FastAPI starter toolkit with Redis caching, JWT Auth & CLI scaffolding</strong>
</p>

<p align="center">
  <a href="https://pypi.org/project/boostapi/"><img src="https://img.shields.io/pypi/v/boostapi?color=blue&logo=pypi&logoColor=white" alt="PyPI version"></a>
  <a href="https://pypi.org/project/boostapi/"><img src="https://img.shields.io/pypi/pyversions/boostapi?logo=python&logoColor=white" alt="Python versions"></a>
  <a href="https://github.com/dhinakaran/boostapi/actions"><img src="https://img.shields.io/github/actions/workflow/status/dhinakaran/boostapi/ci.yml?label=CI&logo=github" alt="CI"></a>
  <a href="https://codecov.io/gh/dhinakaran/boostapi"><img src="https://img.shields.io/codecov/c/github/dhinakaran/boostapi?logo=codecov" alt="Coverage"></a>
  <a href="https://github.com/dhinakaran/boostapi/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="MIT License"></a>
  <a href="https://github.com/dhinakaran/boostapi"><img src="https://img.shields.io/github/stars/dhinakaran/boostapi?style=flat&logo=github" alt="GitHub Stars"></a>
</p>

---

## ✨ Features

| Feature | Details |
|---|---|
| ⚡ **Redis Caching** | Built-in caching templates for instant responses |
| 🔐 **JWT Auth** | Secure authentication with refresh tokens built-in |
| 🗃️ **Async SQLAlchemy** | asyncpg driver, connection pooling, Alembic migrations |
| 🛠️ **CLI Scaffolding** | `boostapi quickstart myapp` → full project in seconds |
| 📦 **Zero-Config** | Works out of the box with sane defaults |
| 🚀 **Production-Grade** | Loguru logging, CORS, rate limiting, OpenAPI docs |

---

## ⚡ 2-Minute Quickstart

### Option A: Scaffold a New Project

```bash
# Install BoostAPI
pip install boostapi

# Scaffold a complete web application
boostapi quickstart my-app
cd my-app

# Start dependencies (PostgreSQL + Redis)
docker compose up -d

# Run migrations & start server
alembic upgrade head
uvicorn app.main:app --reload
```

Open http://localhost:8000/docs — your API is live! 🎉

### Option B: Embed in Your App

```python
# myapp.py
from boostapi import create_app

app = create_app()
# uvicorn myapp:app --reload
```

### Option C: Custom Settings

```python
from boostapi import create_app
from boostapi.app.core.config import Settings

app = create_app(settings=Settings(
    POSTGRES_DB="mydb",
    REDIS_URL="redis://myredis:6379",
    SECRET_KEY="super-secret-change-me",
))
```

---

## 🔌 API Reference

### Authentication

```bash
# Login
curl -X POST http://localhost:8000/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username": "admin", "password": "secret"}'

# Returns:
# {"access_token": "eyJ...", "token_type": "bearer"}
```

### Health Check

```bash
curl http://localhost:8000/api/v1/health/
# {"status": "healthy", "version": "0.1.0", "db": "ok", "redis": "ok"}
```

---

## 🐳 Docker Compose

BoostAPI ships with a production-ready `docker-compose.yml`:

```yaml
# Included automatically via `boostapi quickstart`
services:
  db:    # postgres:16-alpine
  redis: # redis:7-alpine
  app:   # your FastAPI app
```

---

## ⚙️ Configuration

All settings are configurable via environment variables or `.env` file:

| Variable | Default | Description |
|---|---|---|
| `POSTGRES_SERVER` | `localhost` | PostgreSQL host |
| `POSTGRES_PORT` | `5432` | PostgreSQL port |
| `POSTGRES_USER` | `postgres` | DB username |
| `POSTGRES_PASSWORD` | `password` | DB password |
| `POSTGRES_DB` | `boostapi` | Database name |
| `REDIS_URL` | `redis://localhost:6379` | Redis connection URL |
| `SECRET_KEY` | *(change me)* | JWT signing key |
| `ACCESS_TOKEN_EXPIRE_MINUTES` | `30` | Token TTL (minutes) |

---

## 🧪 Testing

```bash
pip install boostapi[dev]
pytest --cov=boostapi
```

---

## 🚀 Deployment

### Render / Fly.io

```bash
# Set environment variables in your hosting dashboard
# then:
uvicorn boostapi.app.main:app --host 0.0.0.0 --port $PORT
```

### Docker

```bash
docker build -t my-app .
docker compose up
```

### Publish to PyPI

```bash
pip install build twine
python -m build
twine upload dist/*
```

---

## 🏗️ Project Structure

```
my-app/                        # generated by `boostapi quickstart`
├── app/
│   ├── main.py                # create_app() entry point
│   ├── api/endpoints/         # auth, health, etc.
│   ├── core/                  # config, security
│   ├── db/                    # models, migrations
│   └── services/              # business logic
├── tests/                     # pytest suite (90%+ coverage)
├── docker-compose.yml
├── alembic.ini
└── .env
```

---

## 📄 License

MIT © [Dhinakaran](https://github.com/dheena731)
