# Pytest Databases
Reusable test fixtures for any and all databases.
<div align="center">
<!-- prettier-ignore-start -->
| Project | | Status |
|-----------|:----|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| CI/CD | | [](https://github.com/litestar-org/pytest-databases/actions/workflows/release.yaml) [](https://github.com/litestar-org/pytest-databases/actions/workflows/ci.yaml) [](https://github.com/litestar-org/pytest-databases/actions/workflows/docs.yaml) |
| Quality | | [](https://codecov.io/github/litestar-org/pytest-databases) [](https://sonarcloud.io/summary/new_code?id=litestar-org_pytest-databases) [](https://sonarcloud.io/summary/new_code?id=litestar-org_pytest-databases) [](https://sonarcloud.io/summary/new_code?id=litestar-org_pytest-databases) [](https://sonarcloud.io/summary/new_code?id=litestar-org_pytest-databases) |
| Package | | [](https://badge.fury.io/py/pytest-databases)  |
| Community | | [](https://discord.gg/litestar-919193495116337154) [](https://matrix.to/#/#litestar:matrix.org) [](https://blog.litestar.dev) [](https://twitter.com/LitestarAPI) [](https://blog.litestar.dev) |
| Meta | | [](https://github.com/litestar-org/pytest-databases) [](https://github.com/python/mypy) [](https://spdx.org/licenses/) [](https://github.com/sponsors/litestar-org) [](https://github.com/astral-sh/ruff) [](https://github.com/psf/black)|
<!-- prettier-ignore-end -->
</div>
> [!WARNING]
>
> Please note that pytest-databases is currently in a pre-release stage of development. This means the library is still under
> active development, and its initial API is subject to change. We encourage developers to experiment with pytest-databases and provide
> feedback, but we recommend against using it in production environments until a stable release is available.`
## About
The `pytest-databases` library aims to make testing with a database as simple as possible.
It is designed to offer pre-configured testing setups for many different types and versions of databases.
## Features
`pytest-databases` currently utilizes `docker compose` (or the legacy `docker-compose`) commands to manage the startup and shutdown of each database service. The following databases are currently available:
- **Postgres**: Version 12, 13, 14, 15, 16 and 17 are available
- **MySQL**: Version 5.6, 5.7 and 8 are available
- **Oracle**: Version 18c XE and 23C Free are available
- **SQL Server**: Version 2022 is available
- **Google AlloyDB Omni**: Simplified Omni installation for easy testing.
- **Google Spanner**: The latest cloud-emulator from Google is available
- **Google BigQuery**: Unofficial BigQuery emulator
- **CockroachDB**: Version latest is available
- **Redis**: Latest version
- **Valkey**: Latest version
- **Dragonfly**: Latest version
- **KeyDB**: Latest version
- **Elasticsearch**: Version 7 and 8 are available
- **Azure blob storage**: Via azurite
## Contributing
All [Litestar][litestar-org] projects will always be a community-centered, available for contributions of any size.
Before contributing, please review the [contribution guide][contributing].
If you have any questions, reach out to us on [Discord][discord], our org-wide [GitHub discussions][litestar-discussions] page,
or the [project-specific GitHub discussions page][project-discussions].
<hr>
<!-- markdownlint-disable -->
<p align="center">
<!-- github-banner-start -->
<img src="https://raw.githubusercontent.com/litestar-org/meta/2901c9c5c5895a83fbfa56944c33bca287f88d42/branding/SVG%20-%20Transparent/logo-full-wide.svg" alt="Litestar Logo - Light" width="20%" height="auto" />
<br>A <a href="https://github.com/litestar-org">Litestar Organization</a> Project
<!-- github-banner-end -->
</p>
[litestar-org]: https://github.com/litestar-org
[contributing]: https://docs.pytest-databases.litestar.dev/latest/contribution-guide.html
[discord]: https://discord.gg/litestar-919193495116337154
[litestar-discussions]: https://github.com/orgs/litestar-org/discussions
[project-discussions]: https://github.com/litestar-org/pytest-databases/discussions
[project-docs]: https://docs.pytest-databases.litestar.dev
[install-guide]: https://docs.pytest-databases.litestar.dev/latest/#installation
[newrepo]: https://github.com/organizations/litestar-org/repositories/new?template=pytest-databases
Raw data
{
"_id": null,
"home_page": null,
"name": "pytest-databases",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "alloydb, alloydbomni, azure, bigquery, cockroachdb, database, duckdb, elasticsearch, migration, mssql, mysql, oracle, postgres, redis, spanner",
"author": null,
"author_email": "Cody Fincher <cody.fincher@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/47/d4/42ceccede9b34f266549a0fabdb8b754db84603844a2878082996bfbf8e4/pytest_databases-0.11.1.tar.gz",
"platform": null,
"description": "# Pytest Databases\n\nReusable test fixtures for any and all databases.\n\n<div align=\"center\">\n\n<!-- prettier-ignore-start -->\n\n| Project | | Status |\n|-----------|:----|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| CI/CD | | [](https://github.com/litestar-org/pytest-databases/actions/workflows/release.yaml) [](https://github.com/litestar-org/pytest-databases/actions/workflows/ci.yaml) [](https://github.com/litestar-org/pytest-databases/actions/workflows/docs.yaml) |\n| Quality | | [](https://codecov.io/github/litestar-org/pytest-databases) [](https://sonarcloud.io/summary/new_code?id=litestar-org_pytest-databases) [](https://sonarcloud.io/summary/new_code?id=litestar-org_pytest-databases) [](https://sonarcloud.io/summary/new_code?id=litestar-org_pytest-databases) [](https://sonarcloud.io/summary/new_code?id=litestar-org_pytest-databases) |\n| Package | | [](https://badge.fury.io/py/pytest-databases)  |\n| Community | | [](https://discord.gg/litestar-919193495116337154) [](https://matrix.to/#/#litestar:matrix.org) [](https://blog.litestar.dev) [](https://twitter.com/LitestarAPI) [](https://blog.litestar.dev) |\n| Meta | | [](https://github.com/litestar-org/pytest-databases) [](https://github.com/python/mypy) [](https://spdx.org/licenses/) [](https://github.com/sponsors/litestar-org) [](https://github.com/astral-sh/ruff) [](https://github.com/psf/black)|\n\n<!-- prettier-ignore-end -->\n</div>\n\n> [!WARNING]\n>\n> Please note that pytest-databases is currently in a pre-release stage of development. This means the library is still under\n> active development, and its initial API is subject to change. We encourage developers to experiment with pytest-databases and provide\n> feedback, but we recommend against using it in production environments until a stable release is available.`\n\n## About\n\nThe `pytest-databases` library aims to make testing with a database as simple as possible.\nIt is designed to offer pre-configured testing setups for many different types and versions of databases.\n\n## Features\n\n`pytest-databases` currently utilizes `docker compose` (or the legacy `docker-compose`) commands to manage the startup and shutdown of each database service. The following databases are currently available:\n\n- **Postgres**: Version 12, 13, 14, 15, 16 and 17 are available\n- **MySQL**: Version 5.6, 5.7 and 8 are available\n- **Oracle**: Version 18c XE and 23C Free are available\n- **SQL Server**: Version 2022 is available\n- **Google AlloyDB Omni**: Simplified Omni installation for easy testing.\n- **Google Spanner**: The latest cloud-emulator from Google is available\n- **Google BigQuery**: Unofficial BigQuery emulator\n- **CockroachDB**: Version latest is available\n- **Redis**: Latest version\n- **Valkey**: Latest version\n- **Dragonfly**: Latest version\n- **KeyDB**: Latest version\n- **Elasticsearch**: Version 7 and 8 are available\n- **Azure blob storage**: Via azurite\n\n## Contributing\n\nAll [Litestar][litestar-org] projects will always be a community-centered, available for contributions of any size.\n\nBefore contributing, please review the [contribution guide][contributing].\n\nIf you have any questions, reach out to us on [Discord][discord], our org-wide [GitHub discussions][litestar-discussions] page,\nor the [project-specific GitHub discussions page][project-discussions].\n\n<hr>\n\n<!-- markdownlint-disable -->\n<p align=\"center\">\n <!-- github-banner-start -->\n <img src=\"https://raw.githubusercontent.com/litestar-org/meta/2901c9c5c5895a83fbfa56944c33bca287f88d42/branding/SVG%20-%20Transparent/logo-full-wide.svg\" alt=\"Litestar Logo - Light\" width=\"20%\" height=\"auto\" />\n <br>A <a href=\"https://github.com/litestar-org\">Litestar Organization</a> Project\n <!-- github-banner-end -->\n</p>\n\n[litestar-org]: https://github.com/litestar-org\n[contributing]: https://docs.pytest-databases.litestar.dev/latest/contribution-guide.html\n[discord]: https://discord.gg/litestar-919193495116337154\n[litestar-discussions]: https://github.com/orgs/litestar-org/discussions\n[project-discussions]: https://github.com/litestar-org/pytest-databases/discussions\n[project-docs]: https://docs.pytest-databases.litestar.dev\n[install-guide]: https://docs.pytest-databases.litestar.dev/latest/#installation\n[newrepo]: https://github.com/organizations/litestar-org/repositories/new?template=pytest-databases\n",
"bugtrack_url": null,
"license": null,
"summary": "Reusable database fixtures for any and all databases.",
"version": "0.11.1",
"project_urls": {
"Documentation": "https://github.com/litestar-org/pytest-databases#readme",
"Issues": "https://github.com/litestar-org/pytest-databases/issues",
"Source": "https://github.com/litestar-org/pytest-databases"
},
"split_keywords": [
"alloydb",
" alloydbomni",
" azure",
" bigquery",
" cockroachdb",
" database",
" duckdb",
" elasticsearch",
" migration",
" mssql",
" mysql",
" oracle",
" postgres",
" redis",
" spanner"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "f6d635be903fbab9ee61b1ac546b36792a66fadd911ab47436312a53ff575a8a",
"md5": "944b82cb2b49dc06f95905a3473cd453",
"sha256": "a1f06ef0c7a602c50b7824bdbca7f8155dac34e890dfcc9a9fc945b619048b77"
},
"downloads": -1,
"filename": "pytest_databases-0.11.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "944b82cb2b49dc06f95905a3473cd453",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 25792,
"upload_time": "2025-02-11T09:13:54",
"upload_time_iso_8601": "2025-02-11T09:13:54.505031Z",
"url": "https://files.pythonhosted.org/packages/f6/d6/35be903fbab9ee61b1ac546b36792a66fadd911ab47436312a53ff575a8a/pytest_databases-0.11.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "47d442ceccede9b34f266549a0fabdb8b754db84603844a2878082996bfbf8e4",
"md5": "87bb17cf433c15ae4aac98c343b2d38c",
"sha256": "03e7f44b272d369fcf393da155debd4f2f989d3c1e50871a7360825834bee80d"
},
"downloads": -1,
"filename": "pytest_databases-0.11.1.tar.gz",
"has_sig": false,
"md5_digest": "87bb17cf433c15ae4aac98c343b2d38c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 183451,
"upload_time": "2025-02-11T09:13:56",
"upload_time_iso_8601": "2025-02-11T09:13:56.874073Z",
"url": "https://files.pythonhosted.org/packages/47/d4/42ceccede9b34f266549a0fabdb8b754db84603844a2878082996bfbf8e4/pytest_databases-0.11.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-11 09:13:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "litestar-org",
"github_project": "pytest-databases#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pytest-databases"
}