con un clic
python-dev
Use when writing Python code, setting up tests with pytest, or configuring Python application deployment.
Menú
Use when writing Python code, setting up tests with pytest, or configuring Python application deployment.
Use when designing REST or GraphQL endpoints, defining request/response schemas, or establishing API versioning and authentication conventions.
Use when writing end-to-end tests with Playwright, setting up Page Object Model, or configuring E2E test CI/CD with artifact management.
Use when building web components, pages, or visually distinctive interfaces where design quality matters as much as code quality.
Use when writing Go code, structuring packages, handling errors, managing concurrency, writing tests, or building deployable Go applications.
Use when reviewing contracts or legal documents for Chinese law risks. 中国法律风险审查专家,识别高危条款并提供修改建议。
Use when design document needs user review - auto-opens browser to render MD content
| name | python-dev |
| description | Use when writing Python code, setting up tests with pytest, or configuring Python application deployment. |
| metadata | {"author":"skills-team"} |
Invoke test-driven-development skill when implementing via TDD.
| Problem | Solution |
|---|---|
| Type hints | Annotate function signatures |
| Internal containers | @dataclass |
| Runtime validation | Pydantic |
| Large datasets | Generators (lazy evaluation) |
| File paths | pathlib.Path |
| Preserving metadata | @functools.wraps |
See references/patterns.md for detailed patterns.
| Pattern | Example |
|---|---|
| Fixtures | @pytest.fixture with yield for setup/teardown |
| Parametrization | @pytest.mark.parametrize |
| Mocking | @patch decorator |
| Running | pytest --cov=pkg, --lf (last-failed), -k "test_name" |
See references/testing.md for complete testing guide.
| Tool | Use |
|---|---|
venv | Standard library |
uv | Fast resolution (recommended) |
pipx | Global CLI tools |
pyproject.toml | Package definition |
See references/deployment.md for Docker, Gunicorn/Uvicorn.
| DO | DON'T |
|---|---|
| Type hints on signatures | Mutable defaults (def foo(x=[])) |
is None check | == None |
| Generators for large data | Load all in memory |
@functools.wraps in decorators | Share state between tests |
| Pin dependency versions | Use :latest Docker tags |