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("hello world!", "myGlobal") 

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

  • Fixed an issue that prevented connections to 8-bit InterSystems IRIS instances.
  • Fixed an issue with importing iris package members when built with cx_Freeze.
  • Fixed an issue where the return type of a value fetched from a CHAR/VARCHAR column would not be a str.

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.

Metadata

Release files for intersystems-irispython 5.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for intersystems-irispython 5.4.1
File
intersystems_irispython-5.4.1-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-win_amd64.whl CPython 3.14, CPython 3.10, CPython 3.9, CPython 3.12, CPython 3.13, CPython 3.11 CPython 3.10, CPython 3.13, CPython 3.14, CPython 3.11, CPython 3.12, CPython 3.9 Windows x86-64 Details
intersystems_irispython-5.4.1-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-win32.whl CPython 3.13, CPython 3.11, CPython 3.9, CPython 3.10, CPython 3.14, CPython 3.12 CPython 3.10, CPython 3.12, CPython 3.14, CPython 3.13, CPython 3.11, CPython 3.9 Windows x86-32 Details
intersystems_irispython-5.4.1-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10, CPython 3.11, CPython 3.13, CPython 3.9, CPython 3.14, CPython 3.12 CPython 3.10, CPython 3.14, CPython 3.13, CPython 3.9, CPython 3.12, CPython 3.11 Linux glibc 2.17+ x86-64 Details
intersystems_irispython-5.4.1-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.9, CPython 3.13, CPython 3.14, CPython 3.10, CPython 3.11, CPython 3.12 CPython 3.12, CPython 3.14, CPython 3.10, CPython 3.13, CPython 3.11, CPython 3.9 Linux glibc 2.17+ ARM64 Details
intersystems_irispython-5.4.1-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-macosx_10_9_universal2.whl CPython 3.13, CPython 3.14, CPython 3.10, CPython 3.9, CPython 3.12, CPython 3.11 CPython 3.10, CPython 3.13, CPython 3.14, CPython 3.12, CPython 3.11, CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) Details

Total release size: 44.4 MB

Release files / intersystems_irispython-5.4.1-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-win_amd64.whl

Download URL intersystems_irispython-5.4.1-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-win_amd64.whl
Size 3.7 MB
Tags CPython 3.10 CPython 3.11 CPython 3.12 CPython 3.13 CPython 3.14 CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
4911374ee8b8a2168ecd16545af4f64da788d3fe4cc2a9191a6c8cd210429a6b
BLAKE2b-256 checksum
How to use checksums
1c707179fecb933ed4fba22ee12c9f00bc3611cfd7cb430a0a535e450eda53fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / intersystems_irispython-5.4.1-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-win32.whl

Download URL intersystems_irispython-5.4.1-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-win32.whl
Size 3.1 MB
Tags CPython 3.10 CPython 3.11 CPython 3.12 CPython 3.13 CPython 3.14 CPython 3.9 Windows x86-32
SHA-256 checksum
How to use checksums
2bcaa32a26d76647b49aaf423cd4152123e6a638b88592fde7df7678e5044ddb
BLAKE2b-256 checksum
How to use checksums
ac156443e794c1383d7177ec8c41f2203e785c3b99be9562c27af93fc5e0942b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / intersystems_irispython-5.4.1-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL intersystems_irispython-5.4.1-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 15.1 MB
Tags CPython 3.10 CPython 3.11 CPython 3.12 CPython 3.13 CPython 3.14 CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
cec58a71c7ad84f399f56fcf2302fec6279c35335f878d092a8d059200404550
BLAKE2b-256 checksum
How to use checksums
9c53e1271abcc2aa05d5792059b8355efcad29bf5180ec8c54daac85612ec11d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / intersystems_irispython-5.4.1-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL intersystems_irispython-5.4.1-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 15.5 MB
Tags CPython 3.10 CPython 3.11 CPython 3.12 CPython 3.13 CPython 3.14 CPython 3.9 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
d560b1e7d212f3cb3c3f927925a368b53a099de2444b955e703f003a670822a2
BLAKE2b-256 checksum
How to use checksums
2ee2a50dabf87b39655cbaee618c1e601f30d3d9c959ee38c7629f2f4b516e53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / intersystems_irispython-5.4.1-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-macosx_10_9_universal2.whl

Download URL intersystems_irispython-5.4.1-cp39.cp310.cp311.cp312.cp313.cp314-cp39.cp310.cp311.cp312.cp313.cp314-macosx_10_9_universal2.whl
Size 7.1 MB
Tags CPython 3.10 CPython 3.11 CPython 3.12 CPython 3.13 CPython 3.14 CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
9305ac6f710c9416673ab58b06a2a097b653facb18b98e7539324540141d34b7
BLAKE2b-256 checksum
How to use checksums
5a74e7a5a74defab45f5e57f4c5de20104f684884339a524531492f392afea16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release history Release notifications | RSS feed

This release

5.4.1 This release

5 release files

5.4.0

5 release files

5.3.2

5 release files

5.3.1

5 release files

5.3.0

5 release files

5.2.1

5 release files

5.2.0

5 release files

5.1.2

5 release files

5.1.1

5 release files

5.1.0

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page