Metadata-Version: 2.1
Name: sqlalchemy-intersystems-iris
Version: 1.0.1
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.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=GPYDEV_sqlalchemy
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=GPYDEV_intro_sql).

## 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](https://pypi.org/project/intersystems-irispython/) 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

For more information on how to use SQLAlchemy with InterSystems IRIS, see [this overview](https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=GPYDEV_sqlalchemy).
The full 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/.

This project includes code derived from sqlalchemy-iris.

Copyright (c) 2021 Dmitry Maslenikov

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

Minor updates to documentation and package metadata.

### Version 1.0.0

Initial release.
