Marketplace

Browse and adopt engineering standards, rules, and configurations. Fork to customize for your organization.

High
11 rules

Use Django migrations properly

django

One migration per change. Never edit applied migrations. Use RunPython for data migrations. Squash when large.

High in 4 rulesets

Use mypy for Python type checking

linting

mypy with --strict mode. Check all files. Fix type errors, don't ignore. Part of CI pipeline.

High in 4 rulesets

Use Alembic for database migrations

python

Alembic for SQLAlchemy migrations. `alembic revision --autogenerate`. Review generated migrations. Stamp for sync.

High in 4 rulesets

Use async/await for I/O operations

python

Async for HTTP (httpx), database (asyncpg), files (aiofiles). Don't mix sync/async in same service.

High in 4 rulesets

Use context managers for resources

python

with statement for files, connections, locks. contextlib for custom managers. Never leave resources open. async with for async resources.

High in 4 rulesets

Use logging module properly

python

logging module, not print. Configure at app entry point. Use __name__ for logger names. Structured logging with extra dict or structlog.

High in 4 rulesets

Use Pydantic for data validation

python

Pydantic BaseModel for validation. Field types with constraints. Serialization built-in. FastAPI integration.

High in 4 rulesets

Use Ruff for linting and formatting

python

Ruff for both linting and formatting (replaces flake8/isort/pylint/Black). Single tool, 100x faster. `ruff check` and `ruff format`.

High in 6 rulesets

Use SQLAlchemy for database access

python

SQLAlchemy 2.0 style. Declarative models. Session management. Async with asyncio extension.

High in 4 rulesets

Use type hints everywhere

python

Type hints on all functions and class attributes. Enables mypy/pyright static analysis.

High in 4 rulesets

uv project structure

python

pyproject.toml for deps, uv.lock (commit it), .python-version, src/ layout. Python 3.12+.

High in 15 rulesets
Medium
15 rules

Use isort for Python imports

formatting

isort for import ordering. Profile: black. Run before Black. Or use Ruff which includes isort.

Medium in 4 rulesets

Use flake8 for Python linting

linting

flake8 for style checks. Use with .flake8 config. max-line-length: 88 (Black compat). Ruff is faster alternative.

Medium in 4 rulesets

Use pyright for Python type checking

linting

pyright: fast type checker. VS Code Pylance backend. strict or basic mode. Better inference than mypy.

Medium in 4 rulesets

Use Poetry for Python dependency management

package_manager

pyproject.toml + poetry.lock. `poetry install --no-dev` for prod. Groups for dev deps. Prefer uv for speed.

Medium in 4 rulesets

Migrate from pipenv to uv

python

pipenv is slow and unmaintained. Migrate to uv for speed and modern features. `uv init` from existing.

Medium in 4 rulesets

Use boto3 for AWS

python

boto3 for AWS services. Use resource API for simple ops, client for advanced. Handle pagination.

Medium in 4 rulesets

Use Celery for distributed tasks

python

Celery for distributed task queue. Redis or RabbitMQ broker. Beat for scheduling. Flower for monitoring.

Medium in 4 rulesets

Use dataclasses or Pydantic for data structures

python

Dataclasses for simple containers, Pydantic for validation. No plain dicts for structured data.

Medium in 4 rulesets

Use httpx for async HTTP

python

httpx for async HTTP client. Requests-compatible API. Async context manager. HTTP/2 support.

Medium in 4 rulesets

Use pylint for comprehensive Python linting

python

pylint for comprehensive checks. Disable noisy rules in pylintrc. Ruff is faster alternative.

Medium in 4 rulesets

Use pytest for testing

python

pytest with fixtures and parametrize. Simple asserts, rich plugin ecosystem.

Medium in 10 rulesets

Use requests for sync HTTP

python

requests for simple sync HTTP. Session for connection pooling. Timeout always. Use httpx for async.

Medium in 4 rulesets

Use unittest for Python basics

python

unittest for simple cases or legacy code. TestCase classes. setUp/tearDown. Prefer pytest for new projects.

Medium in 10 rulesets

uv scripts and commands

python

Define entry points in `[project.scripts]`. Run any command with `uv run <cmd>`. CI: `uv sync --frozen`.

Medium in 9 rulesets

uv workspaces for monorepos

python

Use `[tool.uv.workspace]` for multi-package repos. Single lockfile, editable local packages.

Medium in 5 rulesets