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.post1.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.post1-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: api_template_py-0.1.1.post1.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.post1.tar.gz
Algorithm Hash digest
SHA256 10734c46f2ac00c4117357151b5ba27228acad37af235363395051999c8fa30c
MD5 dbb2257f435bc124816789bb6023e2d2
BLAKE2b-256 247dd728f14f2d975dcb618d90b80fffad897b0efa01c4c3d3895a4c15a9fcfc

See more details on using hashes here.

Provenance

The following attestation bundles were made for api_template_py-0.1.1.post1.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.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for api_template_py-0.1.1.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 d4e867864266c6517427f431eddccecbb2afe3391924c623a09720e75dfd67e0
MD5 f5d6501704ab1d3d8d6288becee7ff9e
BLAKE2b-256 c9f386934286aea46f33e9ed9fb0c93af4b9725032c3f6d8b4ce963bb632889b

See more details on using hashes here.

Provenance

The following attestation bundles were made for api_template_py-0.1.1.post1-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