Skip to main content

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

Demo with Jupiter Notebook

More extensive documentation can be found at Read The Docs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

testcontainers_iris-1.2.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

testcontainers_iris-1.2.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file testcontainers_iris-1.2.2.tar.gz.

File metadata

  • Download URL: testcontainers_iris-1.2.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.21

File hashes

Hashes for testcontainers_iris-1.2.2.tar.gz
Algorithm Hash digest
SHA256 29af673a0fcdcd09a079c820ee23de07efc0a6304d5c009b669d88d83ff7acd1
MD5 79e74ea20d10799278ba2ee6e2f95e36
BLAKE2b-256 56ac5e0e4e1d03cc6464634b5ae09fcba7f91948bffa1d8a6ae622dad4ffc1c6

See more details on using hashes here.

File details

Details for the file testcontainers_iris-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for testcontainers_iris-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fabbd1974a5c7e701aa4a8a583e35b542aceb35ecf6f5b91ab653b8d4f4bd604
MD5 71a93fdf2ad7aaeaf4656c1e3943fc33
BLAKE2b-256 df0c123bc17e450c5c5027539edf7921e71575131cc8c40b873418e3545bc972

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page