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
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.
Faker: Languages for writing tests: Python (3.8 and above). source: README
Responses: Languages for writing tests: Python 3.8 or newer. source: README
JSON Server: Definition format: JSON or JSON5 data file (db.json or db.json5). source: README
Mock Service Worker: Languages for writing tests: JavaScript. source: README
@faker-js/faker: Languages for writing tests: JavaScript (browser and Node.js). source: Docs: Getting Started
Mockito: Languages for writing tests: Java. source: README
Nock: Languages for writing tests: Node.js. source: README
Sinon.JS: Languages for writing tests: JavaScript. source: Docs: SinonJS home
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
- GitHub REST API: repository, read
- GitHub REST API: commits, read
- GitHub REST API: latest release, read
- GitHub REST API: contributors, read
- README, read