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.
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
Close
Hashes for testcontainers-iris-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5acf47e063689073fb12d16215e7f990e4d615d12c4763645831dfa541b32ddb |
|
MD5 | 4676b74117ae1688b5da5b6ed99cdc34 |
|
BLAKE2b-256 | e1eb9cc17c5ffd7906961cc8f61793015aa3c93bf39d6bd01016137c3c3f5070 |
Close
Hashes for testcontainers_iris-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b37e2b7dd749506cfa9813d56e2d708973c14da3d627a1418e101a066aeebd40 |
|
MD5 | a33bc7c970eda7800bd20bc35a003144 |
|
BLAKE2b-256 | b8a9371e3aeb256c4debf8104c242e9e20f485932f62d416773ae8044c48b5e7 |