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...

View on GitHub ↗Jump to charts ↓Open shareable report →

testcontainers/testcontainers-python has 2k+ stars and 350+ forks on GitHub, is written in Python, and was last pushed on Oct 9, 2026. Data as of . Signed-in members get hourly updates — create a free account.

Summary Information

Updated 29 minutes ago
Added to GitGenius on March 24th, 2024
Created on March 22nd, 2017
Open Issues & Pull Requests: 188 (+0)
GitHub issues: Enabled
Number of forks: 390
Total Stargazers: 2,313 (+0)
Total Subscribers: 18 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 9.4 hours
Mean response time: 59.9 days
90th percentile: 141.6 days
Tracked items: 208

Maintainer activity

2 people did triage or write work on this repository in the last 12 months.

Counts unlabeled, assigned, unassigned, milestoned, demilestoned, locked, unlocked over the last 12 months. These are issue and pull request events that require triage or write permission. Commits and code review are not counted. labeled and renamed are excluded because GitHub issue forms record the issue author as the actor. Figures from October 18, 2026. This count is not comparable across projects: each project's automation decides which of these events a person emits. How this is counted.

How this project is maintained

About 17% of issues opened in the past year have never received a reply. 91% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Work labelled "🚀 enhancement" is answered fastest, typically in about 8 hours, while "🛟 help wanted" waits about 6 weeks. Only 52% of issues opened in the past year have been closed. Three people close 75% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 138
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 602 days
Stale 30+ days: 132
Stale 90+ days: 128

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • 🚀 enhancement (87)
  • 👀 requires attention (45)
  • 🛟 help wanted (33)
  • 🐛 bug (28)
  • 📖 documentation (22)
  • 🔀 requires triage (15)
  • 📦 package: core (12)
  • ✅ close on merge (11)

Most active issues this week

Sign in to see which issues are moving.
Sign in

Detailed Description

Testcontainers Python is a library that provides a Python API for running Docker containers during automated testing. It enables developers to create isolated runtime environments for functional and integration tests by leveraging Docker, eliminating the need to manually manage external services or mock dependencies. The library is designed specifically for test automation workflows where containerized services need to be spun up, used, and torn down as part of the test lifecycle.

The repository is classified across multiple domains including microservices, Docker, testing, Python, local environments, BDD, integration testing, automation, test setup, CI/CD, development, containerization, mocking, and container testing. This broad classification reflects the library's role as infrastructure for testing environments rather than application logic. The primary language is Python, and the project maintains a homepage with comprehensive documentation at testcontainers-python.readthedocs.io.

The library supports a wide range of services and databases through container modules. According to the README, it includes convenience methods like get_connection_url() that return SQLAlchemy-compatible connection strings, allowing developers to easily connect to containerized databases like PostgreSQL and retrieve information during tests. This abstraction simplifies the boilerplate code needed to set up and connect to test containers.

Configuration of the library is flexible, supporting both environment variables and runtime configuration. Key environment variables include TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE for specifying Docker socket paths, TESTCONTAINERS_RYUK_PRIVILEGED and TESTCONTAINERS_RYUK_DISABLED for controlling the Ryuk container cleanup utility, RYUK_CONTAINER_IMAGE for custom Ryuk images, and RYUK_RECONNECTION_TIMEOUT for managing reconnection behavior. This configurability allows the library to work across different Docker setups and CI/CD environments.

Community engagement around the repository shows active development and maintenance.

This cross-project contributor presence suggests the library benefits from expertise across different technology ecosystems and maintains standards consistent with large-scale open source projects.

The topics associated with the repository include database, python, python3, selenium, testcontainers, and testing, reflecting its primary use cases in database testing and web testing scenarios. The library integrates with popular testing frameworks and tools, making it a central component in Python testing infrastructure for teams that rely on containerized services during development and continuous integration workflows.