InterSystems IRIS component of testcontainers-python.
Project description
Testcontainers-python for InterSystems IRIS
testcontainers-python facilitates the use of Docker containers for functional and integration testing.
Other implementations
Basic usage
>>> from testcontainers.iris import IRISContainer
>>> import sqlalchemy
>>> iris_container = IRISContainer("intersystemsdc/iris-community:latest")
>>> with iris_container as iris:
... engine = sqlalchemy.create_engine(iris.get_connection_url())
... with engine.begin() as connection:
... result = connection.execute(sqlalchemy.text("select $zversion"))
... version, = result.fetchone()
>>> version
'IRIS for UNIX (Ubuntu Server LTS for ARM64 Containers) 2023.2 (Build 227U) Mon Jul 31 2023 17:43:25 EDT'
The snippet above will spin up a InterSystems IRIS 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.
It is possible to run Enterprise edition as well, with passing a valid iris.key.
iris_container = IRISContainer(
"containers.intersystems.com/intersystems/iris:2023.3",
license_key="/full/path/to/iris.key",
username="testuser",
password="testpass",
namespace="TEST",
)
username
, password
, namespace
will be created during start of the container with required values, user will get %All role
More extensive documentation can be found at Read The Docs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for testcontainers-iris-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55b765185c8e7681b18da420343231eacff642c9221174364b704418aaea47eb |
|
MD5 | 409f267d9b2f804f553e4260bb946298 |
|
BLAKE2b-256 | f37a21139bbc75e3ac2c3399906b9f9ccb90389f4ccfcd575411ddb0116401b9 |
Hashes for testcontainers_iris-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7739346a80382aa60e37d60ecc5f2b6bc48805b0bd2a0c51862cfba94809925a |
|
MD5 | ed34d3f590967f6427ec896d2c36bf21 |
|
BLAKE2b-256 | d97f1fc286b18ba255a8a197e4d6c715fd60b1a8997006d5217b4158699d1217 |