Skip to main content

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

Project description

API Template PY

PyPI version Python 3.10+ uv License: 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)

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

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

Using pip

pip install api-template-py

Quick Start

Create a New Project

# Interactive mode
uv run api-template create

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

Run Your New Project

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

Your API will be available at:

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:

# 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 file for details.

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

api_template_py-0.1.1.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

api_template_py-0.1.1-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

Details for the file api_template_py-0.1.1.tar.gz.

File metadata

  • Download URL: api_template_py-0.1.1.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for api_template_py-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0002de73aa8126323341bf79dbdd3a48b5f57524c4d5f99c2afb77bd53372118
MD5 b16ce92db285a1d483d495d44f4d5d04
BLAKE2b-256 06a1da1ef2eaa2c7a07abc493d46fec1ef56f4bd575dee8a9e8c4b1461db5810

See more details on using hashes here.

Provenance

The following attestation bundles were made for api_template_py-0.1.1.tar.gz:

Publisher: publish.yml on QuangDiy/api-template-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file api_template_py-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for api_template_py-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a085a886bb498e38952e71b3d3892afa301bfaf3a73693d52190706f5272cdde
MD5 6771eb0b48aea807e6657b6cabfe98c2
BLAKE2b-256 49fcae16de1e6f83f7d7fb24ad92dc11777c3824395997599722e39e6f0586bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for api_template_py-0.1.1-py3-none-any.whl:

Publisher: publish.yml on QuangDiy/api-template-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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