testcontainers

Package — TestingPython 3.7+Intermediate

Spin up Docker containers (databases, brokers) for integration tests

Quick Info

Documentation
Official Docs
Python Version
3.7+
Dependencies
docker, urllib3, wrapt
Install
pip install testcontainers

Learn by Difficulty

Quick Example

python
# Install: pip install testcontainers
import testcontainers

# Basic testcontainers usage
print(f"Using testcontainers")
# See documentation for detailed examples

testcontainers is a third-party package. Spin up Docker containers (databases, brokers) for integration tests. Install with: pip install testcontainers

Try in Playground

Tags

packagetestingquality-assurance