Suggest a tool

Testcontainers Python

Metrics as of , from the GitHub or GitLab API of each repository. Refreshed monthly.

What Testcontainers Python is

Testcontainers Python is a Python library that runs Docker containers for functional and integration testing. Containers are used as context managers. The README example starts a PostgreSQL container and connects through a SQLAlchemy-compatible URL returned by get_connection_url(). Leftover containers are removed by Ryuk. Environment variables set the Docker socket, Ryuk image, privileged mode and reconnection timeout, or disable Ryuk entirely. The same settings can be changed at runtime through testcontainers_config.

Written from the project's README, read .

Category
Test data and mocking
License
Apache-2.0
Language
Python
Changelog
Releases on GitHub

Repository metrics

Repository metrics
Stars2,3011
Forks3871
Open issues and PRs1821
Contributors1891
Commits in the last 90 days331
Last commit2026-09-141
Last releasetestcontainers-v4.15.0, 2026-07-241
Fetched

1 Fetched from the GitHub or GitLab API on . Hover a value for its own date.

Status

activeLast commit within 90 days of the fetch date.

Computed from the last commit date and the archive flag on the fetch date. See the status rules.

Alternatives

Listed test data and mocking tools, same primary language first, then by GitHub stars. Each line gives one fact from the tool's documentation where it differs from Testcontainers Python's, with its source.

Questions

Is Testcontainers Python open source?

Yes. Testcontainers Python is released under Apache-2.0, an OSI-approved license, as reported by the GitHub API on 2026-09-22.

Is Testcontainers Python maintained?

On 2026-09-22, the last commit to the default branch was on 2026-09-14, so the listed status is active. Rule: Last commit within 90 days of the fetch date.

How many GitHub stars does Testcontainers Python have?

2,301 stars on 2026-09-22, from the GitHub API. The number is refreshed at each monthly update.

What language is Testcontainers Python written in?

The repository's primary language, as reported by the GitHub API, is Python.

Sources

  1. GitHub REST API: repository, read
  2. GitHub REST API: commits, read
  3. GitHub REST API: latest release, read
  4. GitHub REST API: contributors, read
  5. README, read