sqlalchemy-iris
===
An InterSystems IRIS dialect for SQLAlchemy.
Pre-requisites
---
This dialect requires SQLAlchemy, InterSystems DB-API driver. They are specified as requirements so ``pip``
will install them if they are not already in place. To install, just:
```shell
pip install sqlalchemy-iris
```
Or to use InterSystems official driver support
```shell
pip install sqlalchemy-iris[intersystems]
```
Usage
---
In your Python app, you can connect to the database via:
```python
from sqlalchemy import create_engine
engine = create_engine("iris://_SYSTEM:SYS@localhost:1972/USER")
```
To use with Python Embedded mode, when run next to IRIS
```python
from sqlalchemy import create_engine
engine = create_engine("iris+emb:///USER")
```
To use with InterSystems official driver, does not work in Python Embedded mode
```python
from sqlalchemy import create_engine
engine = create_engine("iris+intersystems://_SYSTEM:SYS@localhost:1972/USER")
```
IRIS Cloud SQL requires SSLContext
```python
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
```shell
docker run -d --name iris \
-p 1972:1972 \
-p 52773:52773 \
-e IRIS_USERNAME=_SYSTEM \
-e IRIS_PASSWORD=SYS \
intersystemsdc/iris-community:preview
```
_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`
Raw data
{
"_id": null,
"home_page": "https://github.com/caretdev/sqlalchemy-iris",
"name": "sqlalchemy-iris",
"maintainer": "CaretDev",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "dmitry@caretdev.com",
"keywords": "\"SQLAlchemy InterSystems IRIS\"",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/03/30/a22c7f0fe676714fbd5b41ab338f41aedd76aeaeab9aa4728bc8af8ac939/sqlalchemy_iris-0.17.0.tar.gz",
"platform": null,
"description": "sqlalchemy-iris\n===\n\nAn InterSystems IRIS dialect for SQLAlchemy.\n\nPre-requisites\n---\n\nThis dialect requires SQLAlchemy, InterSystems DB-API driver. They are specified as requirements so ``pip``\nwill install them if they are not already in place. To install, just:\n\n```shell\npip install sqlalchemy-iris\n```\n\nOr to use InterSystems official driver support\n\n```shell\npip install sqlalchemy-iris[intersystems]\n```\n\nUsage\n---\n\nIn your Python app, you can connect to the database via:\n\n```python\nfrom sqlalchemy import create_engine\nengine = create_engine(\"iris://_SYSTEM:SYS@localhost:1972/USER\")\n```\n\nTo use with Python Embedded mode, when run next to IRIS\n\n```python\nfrom sqlalchemy import create_engine\nengine = create_engine(\"iris+emb:///USER\")\n```\n\nTo use with InterSystems official driver, does not work in Python Embedded mode\n\n```python\nfrom sqlalchemy import create_engine\nengine = create_engine(\"iris+intersystems://_SYSTEM:SYS@localhost:1972/USER\")\n```\n\nIRIS Cloud SQL requires SSLContext\n\n```python\nurl = engine.URL.create(\n drivername=\"iris\",\n host=host,\n port=443,\n username='SQLAdmin',\n password=password,\n database='USER',\n)\n\nsslcontext = ssl.create_default_context(cafile=\"certificateSQLaaS.pem\")\n\nengine = create_engine(url, connect_args={\"sslcontext\": sslcontext})\n```\n\nInterSystems IRIS\n---\n\nYou can run your instance of InterSystems IRIS Community Edition with Docker\n\n```shell\ndocker run -d --name iris \\\n -p 1972:1972 \\\n -p 52773:52773 \\\n -e IRIS_USERNAME=_SYSTEM \\\n -e IRIS_PASSWORD=SYS \\\n intersystemsdc/iris-community:preview\n```\n\n_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)._\n\nThe System Management Portal is available by URL: `http://localhost:52773/csp/sys/UtilHome.csp`\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "InterSystems IRIS for SQLAlchemy",
"version": "0.17.0",
"project_urls": {
"Homepage": "https://github.com/caretdev/sqlalchemy-iris",
"Source": "https://github.com/caretdev/sqlalchemy-iris",
"Tracker": "https://github.com/caretdev/sqlalchemy-iris/issues"
},
"split_keywords": [
"\"sqlalchemy",
"intersystems",
"iris\""
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "06f59b731618db64929216c68e79cc16f30cdfa0971d5081808a21a11f90a144",
"md5": "078030164fd763afd4c3935fcf3aecd3",
"sha256": "1f9bc17c9f934c8dac35d8eb66c4a69a60bf979a89c27eb269a4f99e19f04289"
},
"downloads": -1,
"filename": "sqlalchemy_iris-0.17.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "078030164fd763afd4c3935fcf3aecd3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 149178,
"upload_time": "2025-03-01T05:00:58",
"upload_time_iso_8601": "2025-03-01T05:00:58.484451Z",
"url": "https://files.pythonhosted.org/packages/06/f5/9b731618db64929216c68e79cc16f30cdfa0971d5081808a21a11f90a144/sqlalchemy_iris-0.17.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0330a22c7f0fe676714fbd5b41ab338f41aedd76aeaeab9aa4728bc8af8ac939",
"md5": "41c40ba90ac57e2aae9f5017e2701f53",
"sha256": "e74c90c26ad5032051100235b676ff6387157b04081b717602da579c11b1d6d6"
},
"downloads": -1,
"filename": "sqlalchemy_iris-0.17.0.tar.gz",
"has_sig": false,
"md5_digest": "41c40ba90ac57e2aae9f5017e2701f53",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 127228,
"upload_time": "2025-03-01T05:00:59",
"upload_time_iso_8601": "2025-03-01T05:00:59.992199Z",
"url": "https://files.pythonhosted.org/packages/03/30/a22c7f0fe676714fbd5b41ab338f41aedd76aeaeab9aa4728bc8af8ac939/sqlalchemy_iris-0.17.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-03-01 05:00:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "caretdev",
"github_project": "sqlalchemy-iris",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "SQLAlchemy",
"specs": [
[
">=",
"1.3"
]
]
}
],
"tox": true,
"lcname": "sqlalchemy-iris"
}