Python project template
@rohanjoackhim
关于 Python project template
mcp and python test server
基本信息
配置
工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is Python project template?
Python project template is a starter repository for any Python project, pre-configured with modern development tools. It includes ruff and black for linting and formatting, pytest with coverage for testing, and GitHub Actions to run checks automatically on every pull request and merge. It also provides a devcontainer for a consistent, containerized development environment.
How to use Python project template?
Use the template by creating a new repository from it. You can open it in GitHub Codespaces to automatically initialize the devcontainer, or open it locally in VS Code with the Dev Containers extension. Without a devcontainer, create a virtual environment, install the required packages from requirements-dev.txt, and run pre-commit install. Replace the sample main.py and tests/main_test.py with your own code. Run tests with python3 -m pytest.
Key features of Python project template
- Pre-installed linting with ruff (includes flake8, isort, pyupgrade)
- Code formatting with black
- Testing with pytest and coverage plugin pytest-cov
- Pre-commit hooks for automatic checks
- GitHub Actions CI triggered on pull requests and merges
- Devcontainer configuration for reproducible environments
- Default setup for Python 3.11, easily changeable
Use cases of Python project template
- Starting a new Python project with best practices for code quality
- Ensuring consistent linting, formatting, and testing across a team
- Setting up continuous integration without manual configuration
- Using a containerized development environment for reproducibility
- Learning how to structure a modern Python project with dev tools
FAQ from Python project template
What development tools are included in the template?
The template includes ruff (linting), black (formatting), pre-commit hooks, pytest, and the pytest-cov plugin. Checks and tests are run via GitHub Actions.
How do I change the default Python version from 3.11?
To change the Python version, update the image argument in .devcontainer/devcontainer.json, adjust the config options in .precommit-config.yaml, and change the version number in .github/workflows/python.yaml.
How can I run the tests?
Run python3 -m pytest from the root of the repository. The template includes a sample test in tests/main_test.py.
Where can I find a detailed explanation of the template files?
The README includes a file breakdown section explaining each file and folder. A longer blog post is linked at the bottom of the README.
Does the template include production dependencies?
Yes, requirements.txt lists production dependencies, while requirements-dev.txt lists packages needed only for development (e.g., tools and test libraries).
开发工具 分类下的更多 MCP 服务器
Code Index MCP
johnhuang316A Model Context Protocol (MCP) server that helps large language models index, search, and analyze code repositories with minimal setup
MCP-Bridge
SecretiveShellA middleware to provide an openAI compatible endpoint that can call MCP tools
MCP Unity Editor (Game Engine)
CoderGamesterModel Context Protocol (MCP) plugin to connect with Unity Editor — designed for Cursor, Claude Code, Codex, Windsurf and other IDEs
Burp Suite MCP Server Extension
PortSwiggerMCP Server for Burp
MCP Framework
QuantGeekDevThe Typescript MCP Framework
评论