Thank you for your interest in contributing to the Python Handbook! This document outlines the process for contributing to this open-source learning repository.
We are committed to providing a welcoming and inclusive environment. All contributors are expected to adhere to our code of conduct:
- Be respectful and inclusive
- Accept constructive feedback gracefully
- Focus on what is best for the community
- Show empathy toward other community members
Before creating a bug report, please check the existing issues to avoid duplicates. When creating a bug report, include:
- A clear, descriptive title
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Any error messages or screenshots
- Your environment (Python version, OS, etc.)
Feature requests are welcome! When submitting a feature request:
- Use a clear and descriptive title
- Describe the proposed feature in detail
- Explain why this feature would be useful
- Include any relevant examples or use cases
- Fork the repository
- Create a branch for your changes (
git checkout -b feature/your-feature) - Make your changes following the project's coding standards
- Run tests to ensure everything passes (
pytest) - Build the documentation locally (
mkdocs serve) - Commit your changes with clear, descriptive messages
- Push your branch and open a pull request
- Clone the repository
- Install dev dependencies:
pip install -e .[dev] - Run tests:
pytest - Build docs:
mkdocs build
- Use Python 3.10+ syntax
- Follow PEP 8 style guidelines
- Use type hints where appropriate
- Write clear, descriptive variable and function names
- Include docstrings for functions and classes
- Keep examples simple and runnable
- Use American English in all content
- Use Markdown for all documentation
- Follow the 7-section structure for handbook chapters:
- Overview
- What you will learn
- Core concepts
- Practical examples
- Common mistakes
- Practice tasks
- Key takeaways
- Use consistent heading styles
- Keep examples practical and beginner-friendly
- Target your pull request against the
mainbranch - Include a clear description of your changes
- Reference any related issues
- Ensure all tests pass
- Ensure MkDocs builds without errors
- Keep changes focused and well-scoped
If you have questions about contributing, feel free to:
- Open an issue for discussion
- Join our community discussions
- Contact the maintainers
Thank you for helping make the Python Handbook better for everyone!