https://github.com/litestar-org/pytest-databases
Reusable database fixtures for any and all databases.
https://github.com/litestar-org/pytest-databases
Last synced: 24 days ago
JSON representation
Reusable database fixtures for any and all databases.
- Host: GitHub
- URL: https://github.com/litestar-org/pytest-databases
- Owner: litestar-org
- License: mit
- Created: 2024-03-26T21:28:30.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-02T07:51:20.000Z (about 1 year ago)
- Last Synced: 2024-05-02T23:11:54.988Z (about 1 year ago)
- Language: Python
- Size: 2.09 MB
- Stars: 11
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.rst
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-python-testing - pytest-databases - Reusable database fixtures for any and all databases. (Tools)
README
# Pytest Databases
Reusable test fixtures for any and all databases.
| 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)|> [!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` uses the Docker Python SDK to manage the startup and shutdown of database services in containers. 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
- **Minio**: Latest version## 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].
![]()
A Litestar Organization Project
[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