Metadata-Version: 2.4
Name: api-template-py
Version: 0.1.1.post1
Summary: A CLI tool to scaffold Python API projects following Clean Architecture principles with FastAPI
Author-email: duytq <tranquangduy1810@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/QuangDiy/api-template-py
Project-URL: Documentation, https://github.com/QuangDiy/api-template-py#readme
Project-URL: Repository, https://github.com/QuangDiy/api-template-py
Keywords: fastapi,clean-architecture,api,template,cli,scaffold
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.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Framework :: FastAPI
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.1.0
Requires-Dist: jinja2>=3.1.0
Requires-Dist: rich>=13.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Dynamic: license-file

# API Template PY

[![PyPI version](https://badge.fury.io/py/api-template-py.svg)](https://badge.fury.io/py/api-template-py)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A powerful CLI tool to scaffold Python API projects following **Clean Architecture** principles with **FastAPI**.

## Features

- **Clean Architecture**: Clear separation of concerns with layered architecture
- **FastAPI**: Modern, fast, and production-ready web framework
- **Complete Project Structure**: Pre-configured with all necessary layers
- **Interactive CLI**: Beautiful terminal UI with prompts and colors
- **Dependency Injection**: Built-in DI pattern for loose coupling
- **Type Hints**: Full type safety throughout the codebase

## Installation

### Using uv (Recommended)

```bash
# Install uv if you haven't already
pip install uv

# Run directly with uv (no installation needed)
uv run api-template --version
```

### Using pip

```bash
pip install api-template-py
```

## Quick Start

### Create a New Project

```bash
# Interactive mode
uv run api-template create

# Non-interactive mode
uv run api-template create test-project --non-interactive
```

### Run Your New Project

```bash
cd test-project
uv run uvicorn src.main:app --reload
```

Your API will be available at:
- **API**: http://localhost:8000
- **Interactive Docs**: http://localhost:8000/docs

## CLI Commands

### `api-template create`

**Options:**
- `PROJECT_NAME` - Project name (optional, will prompt if not provided)
- `--description, -d` - Project description
- `--author, -a` - Author name
- `--email, -e` - Author email
- `--python-version, -p` - Python version (3.10, 3.11, 3.12)
- `--no-git` - Skip git initialization
- `--non-interactive` - Non-interactive mode

**Examples:**

```bash
# Interactive mode
uv run api-template create

# With project name
uv run api-template create my-api

# Full non-interactive
uv run api-template create my-api \
  --description "My API" \
  --author "Jane Doe" \
  --email "jane@example.com" \
  --python-version 3.11 \
  --non-interactive
```

## License

MIT License - see the [LICENSE](LICENSE) file for details.

