Metadata-Version: 2.1
Name: sqlalchemy-intersystems-iris
Version: 1.0.0
Summary: An InterSystems IRIS dialect for SQLAlchemy
Home-page: https://www.intersystems.com/
Author: InterSystems Corporation
Author-email: support@intersystems.com
License: LicenseRef-InterSystems-External-Repository
Project-URL: Documentation, https://docs.sqlalchemy.org/
Project-URL: Homepage, https://www.intersystems.com/
Project-URL: License, https://www.intersystems.com/IERTU/
Keywords: "SQLAlchemy InterSystems IRIS"
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Database :: Front-Ends
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: SQLAlchemy >=1.4
Requires-Dist: intersystems-irispython >=5.2

# sqlalchemy-intersystems-iris

This package provides an InterSystems IRIS dialect for [SQLAlchemy](https://www.sqlalchemy.org/), built for use with the [InterSystems Python DB-API driver](https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=BPYNAT_pyapi).

## Installation

Install `sqlalchemy-intersystems-iris` with [`pip`](https://pip.pypa.io/en/stable/):

```bash
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:

```python
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:

```python
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&mdash;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](https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=PAGE_sql).

## Documentation

SQLAlchemy documentation is available at https://docs.sqlalchemy.org/.

## Help

For any issues you can contact [InterSystems Worldwide Response Center (WRC)](https://www.intersystems.com/resources/supporting-your-business-matters-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.
