Metadata-Version: 2.1
Name: testcontainers
Version: 4.0.1
Summary: Python library for throwaway instances of anything that can run in a Docker container
Keywords: testing,logging,docker,test automation
Author: Sergey Pirogov
Author-email: automationremarks@gmail.com
Maintainer: Balint Bartha
Maintainer-email: totallyzen@users.noreply.github.com
Requires-Python: >=3.9,<4.0
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Provides-Extra: arangodb
Provides-Extra: azurite
Provides-Extra: clickhouse
Provides-Extra: elasticsearch
Provides-Extra: google
Provides-Extra: k3s
Provides-Extra: kafka
Provides-Extra: keycloak
Provides-Extra: localstack
Provides-Extra: minio
Provides-Extra: mongodb
Provides-Extra: mssql
Provides-Extra: mysql
Provides-Extra: neo4j
Provides-Extra: nginx
Provides-Extra: opensearch
Provides-Extra: oracle
Provides-Extra: postgres
Provides-Extra: rabbitmq
Provides-Extra: redis
Provides-Extra: selenium
Requires-Dist: azure-storage-blob (>=12.19,<13.0) ; extra == "azurite"
Requires-Dist: boto3 ; extra == "localstack"
Requires-Dist: clickhouse-driver ; extra == "clickhouse"
Requires-Dist: cx_Oracle ; extra == "oracle"
Requires-Dist: docker
Requires-Dist: google-cloud-pubsub (>=2) ; extra == "google"
Requires-Dist: kafka-python ; extra == "kafka"
Requires-Dist: kubernetes ; extra == "k3s"
Requires-Dist: minio ; extra == "minio"
Requires-Dist: neo4j ; extra == "neo4j"
Requires-Dist: opensearch-py ; extra == "opensearch"
Requires-Dist: pika ; extra == "rabbitmq"
Requires-Dist: pymongo ; extra == "mongodb"
Requires-Dist: pymssql ; extra == "mssql"
Requires-Dist: pymysql[rsa] ; extra == "mysql"
Requires-Dist: python-arango (>=7.8,<8.0) ; extra == "arangodb"
Requires-Dist: python-keycloak ; extra == "keycloak"
Requires-Dist: pyyaml ; extra == "k3s"
Requires-Dist: redis ; extra == "redis"
Requires-Dist: selenium ; extra == "selenium"
Requires-Dist: sqlalchemy ; extra == "mssql" or extra == "mysql" or extra == "oracle"
Requires-Dist: urllib3
Requires-Dist: wrapt
Project-URL: GitHub, https://github.com/testcontainers/testcontainers-python
Project-URL: Issue Tracker, https://github.com/testcontainers/testcontainers-python/issues
Description-Content-Type: text/markdown

# Testcontainers Python

`testcontainers-python` facilitates the use of Docker containers for functional and integration testing.

For more information, see [the docs][readthedocs].

[readthedocs]: https://testcontainers-python.readthedocs.io/en/latest/

## Getting Started

```pycon
>>> from testcontainers.postgres import PostgresContainer
>>> import sqlalchemy

>>> with PostgresContainer("postgres:16") as postgres:
...     engine = sqlalchemy.create_engine(postgres.get_connection_url())
...     with engine.begin() as connection:
...         result = connection.execute(sqlalchemy.text("select version()"))
...         version, = result.fetchone()
>>> version
'PostgreSQL 16...'
```

The snippet above will spin up a postgres database in a container. The `get_connection_url()` convenience method returns a `sqlalchemy` compatible url we use to connect to the database and retrieve the database version.

