MCP.so
登录

Python Best Practices Launchpad

@Acid-base

关于 Python Best Practices Launchpad

Python MCP server with CI/CD tooling and testability built-in

基本信息

分类

开发工具

许可证

MIT

运行时

python

传输方式

stdio

发布者

Acid-base

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "FastMCP-Proper": {
      "command": "uv",
      "args": [
        "venv"
      ]
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Python Best Practices Launchpad?

Python Best Practices Launchpad is a modern Python project template with a functional FastAPI REST API. It integrates tools like uv, ruff, mypy, pytest, and pre-commit, and includes Docker containerization and GitHub Actions CI/CD. It is designed for developers who want to build production-ready Python applications with established best practices.

How to use Python Best Practices Launchpad?

You can set up the project using one of three approaches: using Dev Containers (recommended with VS Code or GitHub Codespaces), using Docker Compose, or via a local setup with Linuxbrew/Homebrew and uv. After cloning, run uv venv to create a virtual environment, uv sync to install dependencies, pre-commit install to set up Git hooks, and then start the API with python -m src.my_package.run or uvicorn my_package.api:app --reload. Access the automatically generated OpenAPI documentation at /docs.

Key features of Python Best Practices Launchpad

  • REST API with FastAPI and Pydantic validation
  • Docker multi‑stage builds and Docker Compose support
  • Fast dependency management with uv
  • Linting and formatting with ruff
  • Static type checking with mypy
  • Testing with pytest including unit, API, and integration tests
  • Pre‑commit Git hooks for automated code quality checks
  • GitHub Actions workflow for CI/CD
  • Dev Container configuration for instant development environments

Use cases of Python Best Practices Launchpad

  • Kickstarting a new Python web API with a proven project structure
  • Teaching or learning modern Python tooling and best practices
  • Building a production‑ready microservice with containerization and CI/CD
  • Rapid prototyping with FastAPI and automatic testing

FAQ from Python Best Practices Launchpad

What dependencies and runtime does the template require?

It requires Python 3.10 or later, and uses uv for dependency management. The configured tools include ruff, mypy, pytest, pre-commit, and fastapi with uvicorn.

How can I run the API locally without Docker?

After completing the local setup (clone, virtual environment, dependency install), run python -m src.my_package.run or uvicorn my_package.api:app --reload. The API is then accessible at http://localhost:8000, with documentation at /docs.

Is the template ready for production deployment?

Yes. It includes a multi‑stage Dockerfile, health checks, non‑root user configuration, and a GitHub Actions CI workflow. The FastAPI app has proper error handling, CORS middleware, and input validation.

How do I run tests?

Run pytest from the root folder. The project includes unit tests, API tests, and integration tests, all configured via pytest.ini.

What transport protocol does the API use?

The API uses HTTP, served by Uvicorn (ASGI server). No alternative transports or authentication mechanisms are provided in the template out of the box.

评论

开发工具 分类下的更多 MCP 服务器