Skip to main content

sqlalchemy-intersystems-iris

This package provides an InterSystems IRIS dialect for SQLAlchemy, built for use with the InterSystems Python DB-API driver.

Installation

Install sqlalchemy-intersystems-iris with pip:

pip install sqlalchemy-intersystems-iris

The InterSystems Python DB-API driver is a dependency and will be automatically installed or upgraded to a compatible version.

Usage

You can connect your Python application to an InterSystems IRIS database by passing a connection URL to create_engine(). The URL can be a string or a SQLAlchemy URL object.

A connection string for InterSystems IRIS has the format iris://{username}:{password}@{host}:{port}/{namespace}. For example:

from sqlalchemy import create_engine

url = "iris://SQLUser:password@localhost:1972/USER"

engine = create_engine(url)

You can construct a SQLAlchemy URL with URL.create(). Note that the database field corresponds to an InterSystems IRIS namespace:

from sqlalchemy import create_engine
from sqlalchemy import URL

url = URL.create(
    drivername='iris',
    username='SQLUser',
    password='password',
    host='localhost',
    port=1972,
    database='USER',
)

engine = create_engine(url)

As these examples demonstrate, you do not need to import the dialect package directly — the SQLAlchemy engine will automatically load the correct dialect based on the connection URL.

For details on the features supported by InterSystems IRIS SQL, see the InterSystems IRIS SQL documentation.

Documentation

For more information on how to use SQLAlchemy with InterSystems IRIS, see this overview. The full SQLAlchemy documentation is available at https://docs.sqlalchemy.org/.

Help

For any issues you can contact InterSystems Worldwide Response Center (WRC).

License

This project is licensed under the terms detailed at https://www.intersystems.com/IERTU/.

This project includes code derived from sqlalchemy-iris.

Copyright (c) 2021 Dmitry Maslennikov

The following license applies to that code:

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Release Notes

Version 1.0.3

  • Bump minimum required Python version from 3.8 to 3.9.
  • Improve support for UUIDs. The Uuid column type is now supported alongside UUID. Python uuid.UUID values passed to text().bindparams() no longer have their hyphens removed.
  • Improve compatibility with SQLAlchemy 1.4 and 2.1. Statements that use aggregate_order_by(), which InterSystems IRIS does not support, now fail with a clear error instead of a SQL error from the server.
  • Improve handling of paginated queries using limit() and offset().
    • Use the more performant LIMIT/OFFSET syntax with InterSystems IRIS 2025.1+.
    • Fix bugs where some paginated queries produced invalid SQL or returned incorrect results, including queries with subqueries, UNION, or DISTINCT.
    • Fix a bug where pagination was ignored when the same statement was compiled more than once.

Version 1.0.2

  • Fix SQL error Field '%ID' is ambiguous among the applicable tables when querying a joined table while using limit() and offset().
  • Improve connection initialization performance.

Version 1.0.1

  • Minor updates to documentation and package metadata.

Version 1.0.0

  • Initial release.

Metadata

Release files for sqlalchemy-intersystems-iris 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for sqlalchemy-intersystems-iris 1.0.3
File Interpreter ABI Platform Actions
sqlalchemy_intersystems_iris-1.0.3-py3-none-any.whl Python 3 none any Details for sqlalchemy_intersystems_iris-1.0.3-py3-none-any.whl

Release files / sqlalchemy_intersystems_iris-1.0.3-py3-none-any.whl

Download URL sqlalchemy_intersystems_iris-1.0.3-py3-none-any.whl
Size 37.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6128f4a7dd01cdf518f0c29e2e6ffd9c609baee31f830d43585a623ffd48841
BLAKE2b-256 checksum
How to use checksums
bd2ac9cf51003b0c014d5e1d3059efdab4c0fe12249ed664ffc111e0c92bd901
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Security for sqlalchemy-intersystems-iris 1.0.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page