From litestar-skills
Auto-activate for pytest_databases imports, conftest.py with database fixtures. Container-based database testing with pytest. Use when: creating PostgreSQL/MySQL/SQLite/Oracle fixtures, Docker test containers, database integration tests, or any pytest database setup. Produces container-based database test fixtures with proper lifecycle management. Not for mocking databases or non-pytest test frameworks.
npx claudepluginhub litestar-org/litestar-skills --plugin litestar-skillsThis skill uses the workspace's default tool permissions.
A pytest plugin providing ready-made database fixtures for testing using Docker containers.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Builds scalable data pipelines, modern data warehouses, and real-time streaming architectures using Spark, dbt, Airflow, Kafka, and cloud platforms like Snowflake, BigQuery.
Builds production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. For data pipelines, workflow orchestration, and batch job scheduling.
A pytest plugin providing ready-made database fixtures for testing using Docker containers.
For detailed guides and code examples, refer to the following documents in references/:
Add to conftest.py:
pytest_plugins = ["pytest_databases.docker.postgres"]
def test_database(postgres_service):
# Use postgres_service.host, .port, etc.
pass
</workflow>
<guardrails>
xdist isolation helpers. For parallel runs, select the database-level or server-level isolation fixtures from references/xdist.md instead of sharing one schema across workers.conftest.py declares only the database plugins you actually use (pytest_plugins = [...])postgres_service, mysql_service, etc.) rather than opening raw connectionspytest -n auto) produce isolated data — verified via references/xdist.mdimport pytest
pytest_plugins = ["pytest_databases.docker.postgres"]
@pytest.mark.asyncio
async def test_user_insert(postgres_service, postgres_connection):
await postgres_connection.execute(
"INSERT INTO users (email) VALUES ($1)", "alice@example.com"
)
row = await postgres_connection.fetchrow(
"SELECT email FROM users WHERE email = $1", "alice@example.com"
)
assert row["email"] == "alice@example.com"
</example>
AsyncTestClient.