Metadata-Version: 2.4
Name: inifastapi
Version: 0.1.0
Summary: A reusable FastAPI project initializer with production-oriented templates.
Author: Haoyue
License: MIT
Requires-Python: ==3.12.10
Requires-Dist: jinja2>=3.1.6
Requires-Dist: typer>=0.24.1
Description-Content-Type: text/markdown

# inifastapi

`inifastapi` is a reusable FastAPI project initializer. It generates a production-oriented starter project with explicit router aggregation, settings, middleware, tests, and optional feature modules.

## Requirements

`uv` must be installed on the machine. The scaffold uses `uv` both to run the CLI and to bootstrap the generated FastAPI project.

## Usage

You do not need to install `inifastapi` first if it has been published. The recommended one-off command is:

```bash
uvx inifastapi init my-service
```

More examples:

```bash
uvx inifastapi init my-service --package-name app --with-database --with-auth
uvx inifastapi init my-service --layout src --with-task-queue --with-ci --ci-provider github
```

## Published Package

If `inifastapi` is available on PyPI, prefer `uvx` for one-off usage:

```bash
uvx inifastapi init my-service
```

This downloads and runs the scaffold temporarily. It does not add `inifastapi` to the generated project's dependencies.

## Local Development

If you are working from this repository before publishing, use the local environment:

```bash
uv sync --group dev
uv run inifastapi init my-service
```

You can also run the local source tree without installing it globally:

```bash
uvx --from . inifastapi init my-service
```

## Install

If you want a persistent local development environment for the scaffold itself:

```bash
uv sync --group dev
```

## Features

- Explicit `APIRouter` aggregation
- `pydantic-settings` configuration
- `lifespan` startup/shutdown scaffolding
- Request logging and security middleware
- Optional PostgreSQL + SQLAlchemy + Alembic
- Optional JWT auth skeleton
- Optional Redis cache skeleton
- Optional Celery + RabbitMQ skeleton
- Optional Docker and CI templates
- `uv`-managed `pyproject.toml`, `uv.lock`, and `.venv`

## Development

```bash
uv run python -m pytest
```
