InterSystems IRIS Python SDK
raw JSON → 5.3.2 verified Fri May 01 auth: no python
Official InterSystems IRIS Python SDK for connecting to and interacting with InterSystems IRIS data platform. Current version 5.3.2, supporting Python >=3.8. Released on a per-release cadence aligned with IRIS updates.
pip install intersystems-irispython Common errors
error ModuleNotFoundError: No module named 'iris' ↓
cause Trying to import 'iris' instead of 'intersystems_irispython'.
fix
Install the correct package: pip install intersystems-irispython, then use 'from intersystems_irispython import IRIS'.
error AttributeError: module 'intersystems_irispython' has no attribute 'IRIS' ↓
cause Incorrect import: 'import intersystems_irispython' then trying to use intersystems_irispython.IRIS but the class is inside the module but not directly accessible.
fix
Use 'from intersystems_irispython import IRIS'.
error ConnectionError: [Errno 111] Connection refused ↓
cause Wrong host, port, or IRIS instance not running.
fix
Check hostname, port (default 1972), and ensure IRIS is running and listening on that port.
Warnings
breaking In v5.x, the `IRIS.connection()` method replaced the old `iris.create_connection()` pattern from v4.x. Existing code using `create_connection` will break. ↓
fix Replace `iris.create_connection(...)` with `IRIS.connection(...)`.
gotcha The class name `IRIS` is all uppercase. A common mistake is to use `Iris` or `iris` (lowercase) which will raise AttributeError. ↓
fix Use `from intersystems_irispython import IRIS` (exact casing).
gotcha Default port is 1972 (Superserver), not 51773 or 9091. Using wrong port leads to connection timeout. ↓
fix Ensure port number matches IRIS Superserver port (default 1972).
Imports
- IRIS wrong
import iriscorrectfrom intersystems_irispython import IRIS - iris
import intersystems_irispython.iris as iris
Quickstart
import os
from intersystems_irispython import IRIS
# Connect using environment variables
conn = IRIS.connection(
hostname=os.environ.get('IRIS_HOSTNAME', 'localhost'),
port=int(os.environ.get('IRIS_PORT', 1972)),
namespace=os.environ.get('IRIS_NAMESPACE', 'USER'),
username=os.environ.get('IRIS_USERNAME', '_SYSTEM'),
password=os.environ.get('IRIS_PASSWORD', '')
)
print('Connected:', conn.is_connected())
conn.close()