sqlalchemy-iris
An InterSystems IRIS dialect for SQLAlchemy.
Pre-requisites
This dialect requires SQLAlchemy, InterSystems DB-API driver, and iris-embedded-python-wrapper. They are
specified as requirements so pip will install them if they are not already in place. To install, just:
pip install sqlalchemy-iris
Or to use InterSystems official driver support
pip install sqlalchemy-iris[intersystems]
Usage
In your Python app, you can connect to the database via:
from sqlalchemy import create_engine
engine = create_engine("iris://_SYSTEM:SYS@localhost:1972/USER")
To use with Python Embedded mode through iris-embedded-python-wrapper, when run next to IRIS
from sqlalchemy import create_engine
engine = create_engine("iris+emb://USER")
The legacy path form iris+emb:///USER is also supported.
To use with InterSystems official driver, does not work in Python Embedded mode
from sqlalchemy import create_engine
engine = create_engine("iris+intersystems://_SYSTEM:SYS@localhost:1972/USER")
IRIS Cloud SQL requires SSLContext
url = engine.URL.create(
drivername="iris",
host=host,
port=443,
username='SQLAdmin',
password=password,
database='USER',
)
sslcontext = ssl.create_default_context(cafile="certificateSQLaaS.pem")
engine = create_engine(url, connect_args={"sslcontext": sslcontext})
InterSystems IRIS
You can run your instance of InterSystems IRIS Community Edition with Docker
docker run -d --name iris \
-p 1972:1972 \
-p 52773:52773 \
-e IRIS_USERNAME=_SYSTEM \
-e IRIS_PASSWORD=SYS \
intersystemsdc/iris-community:preview
Examples
IRISVector
from sqlalchemy import Column, MetaData, Table, select
from sqlalchemy.sql.sqltypes import Integer, UUID
from sqlalchemy_iris import IRISVector
from sqlalchemy import create_engine
from sqlalchemy.orm import DeclarativeBase
import uuid
DATABASE_URL = "iris://_SYSTEM:SYS@localhost:1972/USER"
engine = create_engine(DATABASE_URL, echo=False)
# Create a table metadata
metadata = MetaData()
def main():
demo_table = Table(
"demo_table",
metadata,
Column("id", Integer, primary_key=True, autoincrement=True),
Column("uuid", UUID),
Column("embedding", IRISVector(item_type=float, max_items=3)),
)
demo_table.drop(engine, checkfirst=True)
demo_table.create(engine, checkfirst=True)
with engine.connect() as conn:
conn.execute(
demo_table.insert(),
[
{"uuid": uuid.uuid4(), "embedding": [1, 2, 3]},
{"uuid": uuid.uuid4(), "embedding": [2, 3, 4]},
],
)
conn.commit()
result = conn.execute(
demo_table.select()
).fetchall()
print("result", result)
main()
Port 1972 is used for binary communication (this driver, xDBC and so on), and 52773 is for web (Management Portal, IRIS based web-applications and API's).
The System Management Portal is available by URL: http://localhost:52773/csp/sys/UtilHome.csp
Metadata
Release files for sqlalchemy-iris 0.20.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sqlalchemy_iris-0.20.0.tar.gz | 41.3 kB | With provenance | Details for sqlalchemy_iris-0.20.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sqlalchemy_iris-0.20.0-py3-none-any.whl | Python 3 | none | any | Details for sqlalchemy_iris-0.20.0-py3-none-any.whl |
Total release size: 78.2 kB
Release files / sqlalchemy_iris-0.20.0.tar.gz
| Download URL | sqlalchemy_iris-0.20.0.tar.gz |
|---|---|
| Size | 41.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d12f4e3f9f72ebbd271e8f2ce7be68d24fa8e519e3d00369ab206ebd91196aee
|
|
BLAKE2b-256 checksum How to use checksums |
53afcc51e2adb81630ae9099370c3466789afa65ad40ffbee16d72a054675b1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 10, 2026.
Transparency logRelease files / sqlalchemy_iris-0.20.0-py3-none-any.whl
| Download URL | sqlalchemy_iris-0.20.0-py3-none-any.whl |
|---|---|
| Size | 36.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8697f5ccdf2a52c0a6731cc2633a4c2286a4cb3dd74429226e0e66de107e7e68
|
|
BLAKE2b-256 checksum How to use checksums |
b9510df817269cc8a1a78e66def5fb697ec8d48bdd43d324bce6c861aeca2ed6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 10, 2026.
Transparency logSecurity for sqlalchemy-iris 0.20.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sqlalchemy_iris-0.20.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.