Skip to main content

CLI tool to scaffold production-ready FastAPI projects with clean architecture and built-in logging

Project description

PolePosition

A CLI tool to quickly scaffold production-ready FastAPI projects.

Create a clean, structured API project in seconds with built-in logging, configuration, and testing.

Create a new project:

poleposition startproject myapp --install

PyPI version Python License


Example output

$ poleposition startproject myapp --install
Created project: myapp

Installing project dependencies with uv...
Resolved 47 packages in 40ms
Installed 47 packages in 52ms

Project ready.

Next steps:
  cd myapp
  uv run fastapi dev src/myapp/main.py

Why PolePosition?

Starting a FastAPI project should be fast, clean, and predictable.

PolePosition provides:

  • A scalable project structure
  • Environment-based configuration
  • Built-in logging
  • Testing setup
  • A ready-to-run FastAPI application

No boilerplate. No setup friction.


Why not just FastAPI?

FastAPI is excellent, but starting a new project often involves:

  • Recreating the same structure
  • Setting up logging and configuration
  • Organizing modules manually

PolePosition removes that overhead by providing a clean, production-ready starting point out of the box.


Installation

uv tool install poleposition

or

pip install poleposition

Quick example

poleposition startproject myapp --install
cd myapp

uv run fastapi dev src/myapp/main.py

Open your API documentation:

http://127.0.0.1:8000/docs

Quickstart

One-command setup (recommended)

poleposition startproject myapp --install
cd myapp

uv run fastapi dev src/myapp/main.py

Manual setup

poleposition startproject myapp
cd myapp

cp .env.example .env
uv sync

uv run fastapi dev src/myapp/main.py

CLI

poleposition startproject <name> [--install]
poleposition version

Project Structure

myapp/
├─ pyproject.toml
├─ .env.example
├─ src/
│  └─ myapp/
│     ├─ main.py
│     ├─ app.py
│     ├─ api/
│     │  └─ routes/
│     │     └─ status.py
│     └─ core/
│        ├─ config.py
│        └─ logging.py
└─ tests/

Status Endpoint

Check if your service is running:

GET /api/v1/status
{
  "status": "ok",
  "service": "myapp",
  "environment": "development",
  "version": "0.1.0"
}

Philosophy

PolePosition is built around a few principles:

  • Minimal — no unnecessary abstractions
  • Opinionated — sensible defaults
  • Extensible — easy to grow into larger systems

The CLI is intentionally lightweight and avoids heavy templating engines.


Roadmap

  • Project name validation
  • poleposition add module
  • JSON logging support
  • Docker support
  • Production-ready presets

Contributing

Contributions are welcome. Feel free to open an issue or submit a pull request.


License

MIT

Full license: https://github.com/erenertem/poleposition/blob/main/LICENSE

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

poleposition-0.0.6.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

poleposition-0.0.6-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file poleposition-0.0.6.tar.gz.

File metadata

  • Download URL: poleposition-0.0.6.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for poleposition-0.0.6.tar.gz
Algorithm Hash digest
SHA256 5ab693fbbec201ff9509405c77d19519aa167a662a6d63fdbdf83772a7e6aabc
MD5 2ecf41814f8c6e9fa01a7f7e0cfc641a
BLAKE2b-256 00ccacc838b24341ba02da013165a357601195dbd87d80a475b26fd07c0229db

See more details on using hashes here.

File details

Details for the file poleposition-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: poleposition-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for poleposition-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 10135dc08630cf1078e8468a409107ae55b30113cc2c76a983b5a88ed4cb4fe6
MD5 19efb1dca96f23fd31ceb7b3b8c29148
BLAKE2b-256 ea4b4488bba84c60612caf61aa5e9a646c1466c07e685a8a11e2ca10358cce1e

See more details on using hashes here.

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