Skip to main content

intersystems-irispython PyPI version

Installation

Use the package manager pip to install intersystems-irispython.

pip install intersystems-irispython

Usage

Native Connections

import iris

# Open a connection to the server
args = {
	'hostname':'127.0.0.1', 
	'port': 1972,
	'namespace':'USER', 
	'username':'username', 
	'password':'password'
}
conn = iris.connect(**args)

# Create an iris object
irispy = iris.createIRIS(conn)

# Create a global array in the USER namespace on the server
irispy.set("myGlobal", "hello world!") 

# Read the value from the database and print it
print(irispy.get("myGlobal"))

# Delete the global array and terminate
irispy.kill("myGlobal") 
conn.close()

Using DB-API

# Create a DB-API connection using the 'dbapi' module
import iris.dbapi
args = {
	'hostname':'127.0.0.1', 
	'port': 1972,
	'namespace':'USER', 
	'username':'username', 
	'password':'password'
}
conn = iris.dbapi.connect(**args)

# Create a cursor object
cursor = conn.cursor()

# Prepare and execute a SQL
cursor.execute("SELECT * FROM Sample.Person WHERE ID = 1")

# Fetch next row of a query result set
row = cursor.fetchone()

# Retrieve all column values of a row
values = row[:]
print(values)

# Close the cursor object
cursor.close()

More details on how to use DB-API can be found at Using the Python DB-API

Documentation

Full documentation is available at InterSystems Native SDK for Python

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 5.4.0

  • Dropped Python 3.8 support.
  • Fixed some memory safety issues and memory leaks.
  • DB-API enhancements and bug fixes:
    • Added support for SQL keywords FETCH, LIMIT, OFFSET, TO_VECTOR to the parser.
    • Added support for the Python uuid.UUID type.
    • Added support for large streams.
    • Added two new methods getQueryTimeout() and setQueryTimeout() to get and set the query timeout, respectively.
    • Added IDE autocomplete/suggestions for DB-API attributes and methods.
    • Added support for ODBC date/time/datetime formatted strings and Python date/time objects as user parameters in queries.
    • Improved performance when fetching data via fetch*() methods.
    • Fixed an issue where float/double values would be returned as strings with SELECT...ORDER BY syntax.
    • Fixed a <READ> error in the xDBC Error Log when a Connection object goes out of scope without being explicitly closed.
    • Fixed an issue where an iris.dbapi.DataRow object is unusable after the associated Cursor object is garbage-collected without being closed explicitly.

Version 5.3.2

  • Fixed an issue where the DB-API parser would raise an exception when executing SQL statements on tables that contain a column named null_value and the statement itself references that column.

Version 5.3.1

  • Fixed an issue where fetching a lot of data would cause DB-API to hang.
  • Fixed an issue where DB-API would return an int instead of a bool for a %Boolean type value.
  • Fixed an issue where an exception would be raised if a stored procedure's OUT parameter had the value 0.
  • Stream references that were opened with DB-API are now automatically closed when the Cursor object is closed.
  • Attempting an operation on a closed connection now raises an exception.
  • Added support for Python 3.14.

Version 5.3.0

  • Improved performance for fetching data with DB-API through the "read ahead" and "fast select" features. "Read ahead" is enabled by default and "fast select" can be enabled by setting the featureOptions connection parameter to +1.
  • Fixed an issue with string to integer conversions that resulted in a Data Error instead of returning 0 for values like +inf, -inf or NaN.
  • Fixed an issue with the precision of doubles/decimals while rounding.
  • Fixed a typo in the error message for invalid port number.

Version 5.2.1

  • Fixed an issue where using the default value for the sharedmemory parameter would prevent connections to remote hosts with SSL/TLS.
  • Fixed an issue that caused a crash with a PEX shared connection.
  • Improved error messages for issues with SSL/TLS connections.

Version 5.2.0

  • Added support for the following to conform with the DB-API specification in PEP 249:
    • Exceptions
    • Type Objects and Constructors
  • Added support for Common Table Expression (CTE) parsing.
  • executemany(): Fixed an error that did not allow the field value to be in a list or a tuple for an INSERT/UPDATE of multiple rows in a single column.
  • Fixed an issue where executing a SQL statement to insert default values in a table would raise an exception.
  • Fixed an issue where output redirection incorrectly displayed the value None for an empty string.

Version 5.1.2

  • Updated the rowcount attribute to return -1 if the Cursor object is closed.

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 Distributions

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

intersystems_irispython-5.4.0-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.10CPython 3.11CPython 3.12CPython 3.13CPython 3.14CPython 3.9Windows x86-64

intersystems_irispython-5.4.0-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-win32.whl (3.1 MB view details)

Uploaded CPython 3.10CPython 3.11CPython 3.12CPython 3.13CPython 3.14CPython 3.9Windows x86

intersystems_irispython-5.4.0-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (15.2 MB view details)

Uploaded CPython 3.10CPython 3.11CPython 3.12CPython 3.13CPython 3.14CPython 3.9manylinux: glibc 2.17+ x86-64

intersystems_irispython-5.4.0-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (15.5 MB view details)

Uploaded CPython 3.10CPython 3.11CPython 3.12CPython 3.13CPython 3.14CPython 3.9manylinux: glibc 2.17+ ARM64

intersystems_irispython-5.4.0-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-macosx_10_9_universal2.whl (7.1 MB view details)

Uploaded CPython 3.10CPython 3.11CPython 3.12CPython 3.13CPython 3.14CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file intersystems_irispython-5.4.0-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-win_amd64.whl.

File metadata

File hashes

Hashes for intersystems_irispython-5.4.0-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-win_amd64.whl
Algorithm Hash digest
SHA256 97f3568c351de3f5b6cff088f104990b728b3243faab5947ed11357cd646d671
MD5 ae841b1cda2f3661932ad1020ae7fc2b
BLAKE2b-256 96b397b7da76d63e0b7e119872db6f85ae19371a39fe57f037c9fd08fd4e07af

See more details on using hashes here.

File details

Details for the file intersystems_irispython-5.4.0-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-win32.whl.

File metadata

File hashes

Hashes for intersystems_irispython-5.4.0-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-win32.whl
Algorithm Hash digest
SHA256 8df3580f0d82b7d9d7c0b09d40ea04fbebbe3f78ab13251bd6d83d15ebf96e88
MD5 d60fc2fe76153ab1be87f53b1cd6cb8e
BLAKE2b-256 6dd427cb8aff27cdb9223e4dbff2b85e15ddf3fc87d477ea21bfb87c8eb51dfc

See more details on using hashes here.

File details

Details for the file intersystems_irispython-5.4.0-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for intersystems_irispython-5.4.0-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 737d6aa96202e216cf567a1ea04048923dc32ed070aca69cd3e3c1d1471b98a6
MD5 1567919231f2637c18f08de182a0cb3a
BLAKE2b-256 6913c2758a0d4d727813961cf4bde66b618a5eef2580e5d9578f27205555bc3d

See more details on using hashes here.

File details

Details for the file intersystems_irispython-5.4.0-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for intersystems_irispython-5.4.0-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 a8f060b0c25338d3de7bdebd9975d1b206ac07ea31325440a97bfeaede0473f2
MD5 c751b4dd392245eb2fb070ef52383bc9
BLAKE2b-256 fbf8b8a044a0c5afc8e81bf3fa75c09698b32a85550d4caa1b68c709b57b5107

See more details on using hashes here.

File details

Details for the file intersystems_irispython-5.4.0-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for intersystems_irispython-5.4.0-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ae3d147698305161e33ba9e408fde020af917c22f5e738cb3d7e2fb3d113179f
MD5 0901d308ea661b67e85b2ce5df4bb0b9
BLAKE2b-256 7cd800b2e06068975d93910f18111f51754fb921243b9148d0fe50010edf550c

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 Sentry Error logging StatusPage Status page