testcontainers/testcontainers-python
Testcontainers is a Python library that providing a friendly API to run Docker container. It is designed to create runtime environment to use during your automatic tests. observed · 2026-08-28
Health v2 · maintenance only
93/100
- Activity 99
- Release rhythm 82
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 37
- age_days: 3451
- days_rel: 40
- days_push: 7
- n_releases_24m: 20
Adoption not part of the score
2279 stars · 380 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Testcontainers for Python is a library providing a friendly API to spin up Docker containers (databases, browsers, etc.) as runtime environments for automated functional and integration tests. It manages container lifecycle with context managers and offers convenience helpers like connection URL generation.
Use cases
- spin up a throwaway postgres database for integration tests
- run selenium browser tests in a docker container
- test against real databases instead of mocks in pytest
- create isolated runtime environments for automated tests
- start and stop docker containers programmatically in python
When to choose
- you need realistic integration tests against real services like databases or message brokers
- you want ephemeral, disposable test environments managed from Python code
- you're already using Docker in your CI pipeline
When to avoid
- your tests can run against in-memory fakes or mocks without needing real services
- Docker is unavailable in your test environment
- you need to test against services on remote hosts rather than local containers
Facets
library · maturity active
testing e2e-testing container-runtime database testing developer-tools databases python cross-platform integration-testing docker-containers test-fixtures selenium functional-testing devops docker
1 source
- readme: https://github.com/testcontainers/testcontainers-python · fetched 2026-08-28 · 1a5aeab778c1
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| testcontainers/testcontainers-python | main | 93 |
For agents
markdown · JSON · MCP: product_card(name="testcontainers/testcontainers-python")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem