python-fastapi-init

Scaffold FastAPI services with Ruff, mypy, pytest, and Pydantic Settings.

Updated May 15, 2026
One-click install
npx skills add https://github.com/M4RC0Sx/claude-skills --skill python-fastapi-init
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-fastapi-init
Source: https://github.com/M4RC0Sx/claude-skills/tree/main/skills/python-fastapi-init
Command: npx skills add https://github.com/M4RC0Sx/claude-skills --skill python-fastapi-init

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually setting up a new FastAPI project with consistent, production-grade tooling and best practices is time-consuming and prone to configuration drift, leading to inconsistent code quality and missing baseline setups across backend services.

Core Features & Use Cases

  • Strict Code Quality Baseline: Pre-configured Ruff linting with curated rule sets, mypy strict type checking with Pydantic plugin support, and a full pytest test suite with async, coverage, and mocking configuration to enforce quality from the first line of code.
  • Opinionated Project Scaffolding: Automatically sets up uv-managed src-layout projects, Pydantic Settings for environment configuration, CORS middleware, a /healthz liveness endpoint with smoke tests, and optional SQLModel or SQLAlchemy 2.x ORM integration with Alembic migration support.
  • Use Case: Ideal for teams building new internal APIs, customer-facing backends, or microservices that need to follow consistent, maintainable standards without spending days on manual project setup.

Quick Start

Use the python-fastapi-init skill to scaffold a new FastAPI service with your preferred Python version and ORM choice, following all strict baseline best practices out of the box.

Frequently Asked Questions about python-fastapi-init

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bootstrap a FastAPI project with strict code quality baselines?

You can scaffold a new FastAPI project with pre-configured Ruff linting, mypy strict type checking, and pytest test suites to enforce production-grade code quality from the first line.

What is the best way to set up a FastAPI microservice using uv for dependency management?

Using an opinionated scaffolding tool generates a uv-managed src-layout project with Pydantic Settings for environment variables, CORS middleware, and a /healthz liveness endpoint.

Does this FastAPI scaffolding approach support SQLModel and Alembic migrations?

Yes, this scaffolding approach supports optional SQLModel or SQLAlchemy 2.x ORM integration and includes optional Alembic migration setup without forcing a database driver selection.

Can I use mypy strict type checking with Pydantic in a new FastAPI service?

Yes, you can scaffold a new FastAPI service with pre-configured mypy strict type checking that includes dedicated Pydantic plugin support out of the box.

Why does manually configuring a new FastAPI backend project lead to configuration drift?

Manually configuring FastAPI projects leads to configuration drift because manual setup is error-prone, resulting in inconsistent code quality and missing baseline tooling across backend services.

What is included in a pytest test suite for an async FastAPI application?

A scaffolded pytest test suite for an async FastAPI application includes pre-configured async support, coverage configuration, mocking setup, and smoke tests for the /healthz endpoint.