PEP 8
EcosystemPython N/ABeginner
Style guide for Python code: naming, indentation, line length, imports
Quick Info
- Documentation
- Official Docs
- Python Version
- N/A
- Dependencies
- N/A — style guide
- Install
Visit https://peps.python.org/pep-0008/
Learn by Difficulty
Quick Example
python
# PEP 8 # Style guide for Python code: naming, indentation, line length, imports # # Category: Ecosystem # Related: black, ruff, flake8, autopep8, pylint, PEP 20 print("PEP 8: Style guide for Python code: naming, indentation, line length, imports")
PEP 8 is part of the Python ecosystem. Style guide for Python code: naming, indentation, line length, imports.
Try in PlaygroundTags
ecosystemstyle-guideconventionformatting
Related Items
black
Package — Code Quality
Opinionated formatter: one canonical Python style
ruff
Package — Code Quality
Extremely fast linter and formatter in Rust; replaces flake8, isort
flake8
Package — Code Quality
Linting: PyFlakes + pycodestyle + McCabe complexity
autopep8
Package — Code Quality
Auto-format to PEP 8 style
pylint
Package — Code Quality
Comprehensive static analysis: errors, style, refactoring
PEP 20
Ecosystem
The Zen of Python: guiding principles (import this)