Skip to main content

An InterSystems IRIS dialect for SQLAlchemy

Project description

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

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

Release Notes

Version 1.0.0

Initial release.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sqlalchemy_intersystems_iris-1.0.0-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

Details for the file sqlalchemy_intersystems_iris-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sqlalchemy_intersystems_iris-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4838afa48c6a2789288dc1e793a230a3eac31ce7850d9d11a24fbc0526dce182
MD5 ff139ded667c594b3c19386a73c83671
BLAKE2b-256 62a239e8ca74b12644ad59752dd40f6162ab5eb6f97284fb9b248a82e99c2a8d

See more details on using hashes here.

Supported by

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