Use when debugging Python via pdb or remote debugpy (DAP). Triggers: pdb, debugpy, remote debug python.
负责《Paddle API 对齐 PyTorch 项目》中 Step2:API 代码修改,实施『Python 装饰器』方案。通过 Python 装饰器,在 Python 层为 Paddle API 实现参数名称、参数顺序、参数类型和参数用法的重载,实现 PyTorch 风格的 API 调用,并保持 Paddle API 的向后兼容性。
Resolves and visualizes Python package dependency graphs using pip, pipdeptree, and the PyPI JSON API.
Use when designing module boundaries, planning refactors, or reviewing architecture in Python codebases.
Python design patterns including KISS, Separation of Concerns, Single Responsibility, and composition over inheritance.
Opinionated Python development setup with uv + ty + ruff + pytest + just. Use when creating new Python projects, setting up pyproject.toml, configuring linting, type checking,…
You are a Python project architecture expert specializing in scaffolding production-ready Python applications.
Extracts and indexes Python module documentation using ast.parse and docstring_parser library. Supports Google, NumPy, and Sphinx docstring formats with type hint…
Handle noisy git diffs from src/*.egg-info generated by editable installs (uv) and decide whether to commit or ignore.
Fast Python environment management with uv (10-100x faster than pip). Triggers on: uv, venv, pip, pyproject, python environment, install package, dependencies.
Python environment setup with uv, shared utilities, and script structure guidelines.
Python error handling patterns including input validation, exception hierarchies, and partial failure handling.
Use when designing error handling, retry policies, timeout behavior, or failure classification in Python.
Four-step recovery workflow for code execution failures when inline Python fails
Fallback method for executing Python when execute_code_sandbox fails with unknown errors
Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh). Pre-installed: NumPy, Pandas, Matplotlib, requests, BeautifulSoup, Selenium — from…
Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh). Pre-installed: NumPy, Pandas, Matplotlib, requests, BeautifulSoup, Selenium — from…
Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh). Pre-installed: NumPy, Pandas, Matplotlib, requests, BeautifulSoup, Selenium — from…
Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh). Pre-installed: NumPy, Pandas, Matplotlib, requests, BeautifulSoup, Selenium — from…
Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh). Pre-installed: NumPy, Pandas, Matplotlib, requests, BeautifulSoup, Selenium — from…
Execute Python code in a safe sandboxed environment via [inference.sh](https://inference.sh). Pre-installed: NumPy, Pandas, Matplotlib, requests, BeautifulSoup, Selenium — from…
Python expert for stdlib, packaging, type hints, async/await, and performance optimization
Expert guidance for Python testing that analyzes your existing setup and provides evidence-based recommendations.
Python FastAPI development with uv package manager, modular project structure, SQLAlchemy ORM, and production-ready patterns.
Python FastAPI backend development with async patterns, SQLAlchemy, Pydantic, authentication, and production API patterns. — from engineering/backend
Bootstrap a new FastAPI service with uv + the canonical strict baseline — Ruff with curated extend-select, mypy strict with extra error codes, pytest baseline.
Complete FastAPI production system. PROACTIVELY activate for: (1) Project structure (scalable layout), (2) Pydantic schemas (input/output separation), (3) Dependency injection,…
FastAPI web framework patterns. Triggers on: fastapi, api endpoint, dependency injection, pydantic model, openapi, swagger, starlette, async api, rest api, uvicorn.
FastAPI web framework patterns. Triggers on: fastapi, api endpoint, dependency injection, pydantic model, openapi, swagger, starlette, async api, rest api, uvicorn.
Python 3.12+ coding guidelines for APIs, data processing, scripting. Apply when editing `.py` files. Use for async code, type hints, dataclasses, file operations, resource…
When running multi-line Python code or code with quotes, apostrophes, or f-strings via Bash, always use heredoc syntax instead of python -c to avoid shell quoting issues.
Python patterns for system reliability — background jobs and task queues (Celery, async), resilience and recovery (retries, backoff, timeouts, circuit breakers via tenacity), and…
Use when building or reviewing external API integrations in Python — designing client boundaries, defining outbound reliability policy, or structuring contract tests.
Teach while coding in Python. Use when the task involves Python code and the user wants explanations, step-by-step reasoning, refactors, testing guidance, data-flow clarity, or…
Generates searchable Python library references using ast module for source parsing and Sphinx autodoc integration.
Expert guidance for Python logging libraries including structlog, standard logging, and log analysis.
Use when choosing or configuring Python logging, especially deciding between stdlib logging and loguru for apps or CLIs.
Python logging with loguru, structlog, and orjson. TRIGGERS - loguru, structlog, structured logging, JSONL logs, log rotation, secret redaction, OTel logging, lightweight logging,…
Use HSP's ty-backed Python route for semantic navigation, diagnostics, references, rename, call hierarchy, formatting, and code actions.
Comprehensive guide to python metaprogramming. Master the concepts, implementation, best practices, and real-world applications of python metaprogramming in professional…
Modern Python patterns for Modal.com serverless platform. PROACTIVELY activate for: (1) Modal function deployment, (2) Type-safe Modal with Pydantic, (3) Async patterns in Modal,…
When a Python file exceeds ~300 lines, split it into a package. Use when reading a file and noticing it's too large, or when explicitly asked to split a module.
Use when writing Python that calls a function returning an Optional value (e.g., dict.get, re.search) before accessing attributes on the result.
Use when writing or reviewing asyncio code in Jupyter notebooks or '#%%' cell workflows — structuring event-loop ownership, orchestrating async tasks, or choosing compatibility…
Python observability patterns including structured logging, metrics, and distributed tracing. Use when adding logging, implementing metrics collection, setting up tracing, or…
Observability patterns for Python applications. Triggers on: logging, metrics, tracing, opentelemetry, prometheus, observability, monitoring, structlog, correlation id.
Observability patterns for Python applications. Triggers on: logging, metrics, tracing, opentelemetry, prometheus, observability, monitoring, structlog, correlation id.
Guidelines for Python and Odoo enterprise application development with ORM, XML views, and module architecture best practices.
Maps the public API surface of Python packages using ast module parsing and importlib introspection. Generates comprehensive reference docs with type annotations from mypy stubs.
Builds dependency graphs for Python packages using the PyPI JSON API and pipdeptree library. Visualizes transitive dependency chains and identifies version conflict risks.
Retrieves and indexes Python package documentation from PyPI metadata API and Read the Docs API. Uses ast module parsing and pydoc introspection to extract function signatures,…
Validate Python package surfaces with pyproject metadata, uv-managed builds, dependency boundaries, local smoke checks, semantic versioning, and release-boundary guidance.
Comprehensive guide to creating, structuring, and distributing Python packages using modern packaging tools, pyproject.toml, and publishing to PyPI.
Create distributable Python packages with proper project structure, setup.py/pyproject.toml, and publishing to PyPI.
Create distributable Python packages with proper project structure, setup.py/pyproject.toml, and publishing to PyPI.
Structure Python projects for distribution with pyproject.toml, src layouts, dependency management, and publishing workflows.
Python development principles and decision-making. Framework selection, async patterns, type hints, project structure. Teaches thinking, not copying. — from sskim91/dotfiles
Advanced Python patterns — concurrency (threading, multiprocessing, async/await), hexagonal architecture with FastAPI, RFC 7807 error handling, memory optimization, pyproject.toml…
Apply when writing, reviewing, or refactoring Python code that involves interfaces, design patterns, or class hierarchies.
Use when working with Peewee ORM patterns, especially DatabaseProxy setup, scoped connection/transaction handling, and SQLite-based tests.