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.0b2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c467ed141d8382a23a7ead555b9ca7b3945ba2033851542ea42479fc57f5ce8c |
|
MD5 | a9ab357e275a6e16f40fda65b61a8a71 |
|
BLAKE2b-256 | 1c6bc838a11cf235bc9c73f69faad3f625ba0a9ea6cad5e7a84bf8e9b52dc35c |
Hashes for testcontainers_iris-1.1.0b2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1530bbd4998e4af093669192c1abcb8ee20543ad8b4662461e9ca2246a97dfc |
|
MD5 | 07858bb05e01df8d8d5d236d8103da6f |
|
BLAKE2b-256 | 169b6da61cda2c5382cbfdc2bb0d58575b0292d56ee4c10923074b798ef91ae1 |