testcontainers-core
Core component of testcontainers-python.
Decision gist · record as of 2026-08-14
Yes, with conditions. The package is actively maintained and widely used, with no known vulnerabilities. However, it is still at release candidate stage (0.0.1rc1) with no stable release, and its license is unclear in the metadata. Install it for testing workflows if you accept pre-release stability and can verify the license separately; avoid it in production code or strict license-compliance environments until a stable release and clear license terms are published.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Docker daemon to be running and accessible; tests will fail if Docker is not installed or the daemon is not reachable.
- Low install friction with only two runtime dependencies (docker and wrapt).
- Actively maintained with recent commits; however, the package is at release candidate stage (0.0.1rc1) and has not had a stable release since its initial 2023-01-06 date, which may warrant caution in production environments.
License · maintenance · safety
(unclear) — License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms before adopting this package in a commercial or restricted-license project.
last release 2023-01-06 (1316 days) · last repo commit 2026-07-31 · 2,271 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 341,414 downloads/mo, #7,403 on PyPI
Alternatives
Verify before relying
pip install testcontainers-core
from testcontainers.postgres import PostgresContainer
with PostgresContainer("postgres:16") as postgres:
connection_url = postgres.get_connection_url()- Whether the package has an official stable release or if 0.0.1rc1 is the current recommended version for production use.
- The actual license under which testcontainers-core is distributed, given the unclear license_treatment in metadata.
- Support scope and compatibility for container runtimes beyond Docker (e.g., Podman).
- Full range of supported container types beyond PostgreSQL mentioned in the description excerpt.
What it is and what it does
testcontainers-core is the foundation of the testcontainers-python library, enabling developers to use Docker containers as ephemeral test fixtures for integration and functional testing. Instead of managing database instances or other services manually, you define containers declaratively in your test code and they start and stop with your test lifecycle.
The package wraps Docker's API and provides container lifecycle management through Python context managers. It handles resource cleanup automatically and includes ryuk, a sidecar container that ensures dangling test containers are reaped even if tests crash. With only docker and wrapt as runtime dependencies, it has minimal overhead and integrates naturally into test frameworks.
Use it for
- Spin up a PostgreSQL database for each test run without manual provisioning or teardown.
- Test application code against a real service instance in isolation without affecting other tests.
- Verify database migrations and schema changes in a fresh container for each test suite run.
- Integration test services by launching dependent containers on demand.
- Validate application behavior against specific service versions by pulling different container images per test.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
The package is actively maintained and widely used, with no known vulnerabilities. However, it is still at release candidate stage (0.0.1rc1) with no stable release, and its license is unclear in the metadata. Install it for testing workflows if you accept pre-release stability and can verify the license separately; avoid it in production code or strict license-compliance environments until a stable release and clear license terms are published.
Install
testcontainers-core on PyPI
Before you install
Low install friction with only two runtime dependencies (docker and wrapt). Actively maintained with recent commits; however, the package is at release candidate stage (0.0.1rc1) and has not had a stable release since its initial 2023-01-06 date, which may warrant caution in production environments.
Requires Docker daemon to be running and accessible; tests will fail if Docker is not installed or the daemon is not reachable.
License in practice
License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms before adopting this package in a commercial or restricted-license project.
Quickstart
pip install testcontainers-core
from testcontainers.postgres import PostgresContainer
with PostgresContainer("postgres:16") as postgres:
connection_url = postgres.get_connection_url()
Verify before relying
- Whether the package has an official stable release or if 0.0.1rc1 is the current recommended version for production use.
- The actual license under which testcontainers-core is distributed, given the unclear license_treatment in metadata.
- Support scope and compatibility for container runtimes beyond Docker (e.g., Podman).
- Full range of supported container types beyond PostgreSQL mentioned in the description excerpt.
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesdockerwrapt |
| Maintenance | Actively maintained 1,316 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 341,414 / month, #7,403 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: testcontainers_core-0.0.1rc1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “docker containers for testing”
- testcontainers-coreProvides Docker container orchestration for functional and…
- molecule-dockerMolecule Docker Plugin enables Docker containers as test…
- tox-dockerA tox plugin that manages Docker container lifecycle during test…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also testcontainers · testcontainers-postgres · pytest-databases · pytest-container · tox-docker · prefect-docker · pytest-mock-resources · pytest-docker-tools · docker · apache-airflow-providers-docker