--- id: testcontainers version: "4.15.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # testcontainers — Python library for throwaway instances of anything that can run in a Docker container License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install testcontainers uv add testcontainers poetry add testcontainers ## Description [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) ![PyPI - Version](https://img.shields.io/pypi/v/testcontainers) [![PyPI - License](https://img.shields.io/pypi/l/testcontainers.svg)](https://github.com/testcontainers/testcontainers-python/blob/main/LICENSE) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/testcontainers.svg)](https://pypi.python.org/pypi/testcontainers) [![codecov](https://codecov.io/gh/testcontainers/testcontainers-python/branch/master/graph/badge.svg)](https://codecov.io/gh/testcontainers/testcontainers-python) ![Core Tests](https://github.com/testcontainers/testcontainers-python/actions/workflows/ci-core.yml/badge.svg) ![Community... ## AI interpretation — verify before relying Testcontainers provides a Python library for spinning up Docker containers during functional and integration tests, enabling you to test against real database instances and other services without mocking. Verdict: Testcontainers is a mature, actively maintained library for Docker-based integration testing with no known vulnerabilities. Apache-2.0 licensing and low install friction make it suitable for most projects. Requires Docker availability and Python 3.10+. [View on SkillFed](https://skillfed.io/packages/testcontainers) · [View on PyPI](https://pypi.org/project/testcontainers/)