{"library":"pytest-databases","title":"pytest-databases","description":"Reusable pytest fixtures for spinning up and tearing down real database containers (PostgreSQL, MySQL, Redis, MongoDB, and more) using Docker or podman. Current version 0.17.0, actively maintained by Litestar-org with monthly releases.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install pytest-databases"],"cli":null},"imports":["from pytest_databases import postgresql_fixture","from pytest_databases import redis_fixture","from pytest_databases import mysql_fixture","from pytest_databases import mongodb_fixture","from pytest_databases import valkey_fixture"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pytest\nfrom pytest_databases import postgresql_fixture\n\n# Use the fixture directly\npytest_plugins = ['pytest_databases']\n\ndef test_database(postgresql_fixture):\n    # postgresql_fixture yields a connection URL string\n    db_url = postgresql_fixture\n    assert 'postgresql://' in db_url\n","lang":"python","description":"Minimal test using the PostgreSQL fixture. The fixture automatically starts a container and yields the connection URL. No configuration needed if Docker is available.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}