Python development guidelines and best practices. Use when working with Python code.
49
52%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./skills/python/SKILL.mdStandards and best practices for Python development. Follow these guidelines when writing or modifying Python code.
Apply DRY, KISS, and SOLID consistently. Prefer functional methods where relevant; use classes for stateful behavior. Use composition with Protocol classes for interfaces rather than inheritance. Each module should have a single responsibility. Use dependency injection for class dependencies.
Any unless necessary__init__.py; prefer blank filesdict, list instead of typing.Dict, typing.Liststr | None instead of Optional[str]from __future__ import annotations at top of files with type hintsenvironment.py file with individual methods per variable (e.g., api_key() for API_KEY, database_url() for DATABASE_URL)src/ directory structuretest_def foo() create class TestFoopytest over unittestpytest-mock for mockingconftest.py for shared fixturestests/__test_<package_name>__ for shared testing codeWhen implementing Python code:
references/uv-scripts.md.references/uv-monorepo.md.3376255
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.