advanced-alchemy
Use when working with advanced_alchemy, alembic/, SQLAlchemyAsyncRepositoryService, SQLAlchemyAsyncConfig, repository_type,…
Use when working with pytest_databases, Docker DB fixtures, PostgreSQL/pgvector/ParadeDB, MySQL/MariaDB, Oracle/SQL Server, CockroachDB, MongoDB, Redis/Valkey, BigQuery/Spanner, MinIO, or RustFS. Not for mocked DBs.
Claude Code
$ npx -y skills add litestar-org/litestar-skills --skill pytest-databases --agent claude-code
Codex
$ npx skills add litestar-org/litestar-skills --skill pytest-databases -a codex -y
Cursor
$ npx skills add litestar-org/litestar-skills --skill pytest-databases -a cursor -y
Gemini CLI
$ npx skills add litestar-org/litestar-skills --skill pytest-databases -a gemini-cli -y
GitHub Copilot
$ npx skills add litestar-org/litestar-skills --skill pytest-databases -a github-copilot -y
OpenCode
$ npx skills add litestar-org/litestar-skills --skill pytest-databases -a opencode -y
Windsurf
$ npx skills add litestar-org/litestar-skills --skill pytest-databases -a windsurf -y
name: pytest-databases description: "Use when working with pytest_databases, Docker DB fixtures, PostgreSQL/pgvector/ParadeDB, MySQL/MariaDB, Oracle/SQL Server, CockroachDB, MongoDB, Redis/Valkey, BigQuery/Spanner, MinIO, or RustFS. Not for mocked DBs."
`pytest-databases` provides session-scoped, container-backed service fixtures. This guidance targets the immutable `v0.19.0` tag. Load only the plugin modules the test suite uses. Consume a ready client fixture where one exists; otherwise connect with the client already used by the project.
PostgreSQL connection fixtures use synchronous `psycopg`; do not `await` their methods.
the project's existing client from the service object's host, port, and credentials.
backend globally.
pip install "pytest-databases[postgres]"
In `conftest.py`:
pytest_plugins = ["pytest_databases.docker.postgres"]
The core `pytest_databases` pytest entry point supplies `docker_client` and `docker_service`. Each database module supplies its own fixtures.
| Need | Use | | --- | --- | | A ready `psycopg` connection | `postgres_connection`, a versioned PostgreSQL-family connection, or `cockroachdb_connection` | | A ready vendor client | `bigquery_client`, `spanner_connection`, `mongodb_connection`, an Oracle connection, a GizmoSQL connection, or an Azure Blob container client | | Service coordinates for the project's own client | The backend's `*_service` fixture | | A specific PostgreSQL-family release | Matching `*_NN_service`, `*_NN_connection`, and `*_NN_port` fixtures | | Parallel worker isolation | The backend's exact `*_xdist_isolation_level` fixture from [xdist.md](references/xdist.md) |
See [reference.md](references/reference.md) for the exact plugin, service, and ready-client matrix. Do not infer a `*_connection` fixture from a `*_service` fixture's name.
<workflow>
1. Install the extra matching the selected backend. Backends with no bundled Python client, such as MySQL, MariaDB, SQL Server, and YugabyteDB, expose service fixtures and expect the project to supply its own driver. 2. Add only the required `pytest_databases.docker.<module>` entries to `pytest_plugins`. 3. Prefer a ready client fixture listed in [reference.md](references/reference.md). Otherwise construct the project's existing client from the typed service fixture. 4. Override session-scoped configuration fixtures in `conftest.py`. Use environment variables only where 0.19.0 explicitly reads them; see [config.md](references/config.md). 5. For `pytest-xdist`, keep the default `"database"` isolation when the service supports logical namespaces. Override the backend's exact isolation fixture to `"server"` when each worker needs its own container. 6. Run the focused integration tests against a Docker-compatible daemon.
</workflow>
<guardrails>
(`*_connection`, `*_client`) exist for PostgreSQL-family, CockroachDB, Oracle, GizmoSQL, BigQuery, Spanner, MongoDB, and Azure Blob. Service-only backends (MySQL, MariaDB, SQL Server, YugabyteDB, Dolt, Redis, Dragonfly, KeyDB, Valkey, Elasticsearch, MinIO, and RustFS) export `*_service` fixtures but no ready client fixture. Note that `redis`, `valkey`, and `elastic_search` still import their Python client package at module load time for readiness checks, whereas `mysql`, `mariadb`, `mssql`, `yugabyte`, `dolt`, `minio`, and `rustfs` require no Python client dependency to start the service.
`elasticsearch_service` requests an undefined `elasticsearch8_service` fixture (missing underscore) — request `elasticsearch_8_service` or `elasticsearch_7_service` directly. `oracle_startup_connection` requests an undefined `oracle_23ai_startup_connection` fixture — request `oracle_23ai_connection` or `oracle_18c_connection` instead.
pgvector, and ParadeDB live in `pytest_databases.docker.postgres` (not `alloydb`); Azurite / Azure Blob lives in `pytest_databases.docker.azure_blob` (not `azurite`, with `AzureBlobService`, `azure_blob_container_client`, and `azure_blob_async_container_client`); Elasticsearch lives in `pytest_databases.docker.elastic_search` (not `elasticsearch` or `ElasticSearch`); Dragonfly and KeyDB live in `pytest_databases.docker.redis`.
`psycopg.Connection`; call `execute()` directly.
uses `azure_blob_xdist_isolation_level`; most others use `xdist_<backend>_isolation_level`.
`pytest_addoption` flags; configure services via session-scoped fixture overrides or the environment variables in [config.md](references/config.md).
lifecycle through `docker_service`.
Use the 0.19.0 PostgreSQL-family `*_port` fixture or matching environment variable only when a rootless/container-network constraint requires it (`redis_port`, `dragonfly_port`, `keydb_port`, and `valkey_port` only read `*_service.port`).
</guardrails>
<validation>
Opinionated, first-party agent skills, plugins, subagents, hooks, and rules for the Litestar framework and its ecosystem — published from a single-root repository across Google Antigravity, Claude Code, Codex CLI, Cursor, OpenCode, and VS Code / Copilot.
Use when working with advanced_alchemy, alembic/, SQLAlchemyAsyncRepositoryService, SQLAlchemyAsyncConfig, repository_type,…
Use when working with litestar_autowire, AutowirePlugin, AutowireConfig, domain_packages, AutowireIntegration, AutowireLoader, or…
Use when working with uv build, hatch build, PyApp, PYAPP_*, wheel assets, GitHub release matrices, cargo-zigbuild, or…
Use when working with Dockerfile, compose, Railway, Cloud Run, GKE, systemd, Kubernetes, Terraform, deploy scripts, or…
Use when working with zensical.toml, docs/conf.py, sphinx, shibuya, litestar-sphinx-theme, mkdocstrings, Griffe, objects.inv, or…
Use when working with litestar_email, EmailPlugin, EmailConfig, EmailService, EmailMessage, SMTPConfig, ResendConfig,…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.