Skip to main content

InterSystems IRIS Python SDK Kit

Project description

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

Project details


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.3.2-cp38.cp39.cp310.cp311.cp312.cp313.cp314-cp38.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.8CPython 3.9Windows x86-64

intersystems_irispython-5.3.2-cp38.cp39.cp310.cp311.cp312.cp313.cp314-cp38.cp39.cp310.cp311.cp312.cp313.cp314-win32.whl (3.0 MB view details)

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

intersystems_irispython-5.3.2-cp38.cp39.cp310.cp311.cp312.cp313.cp314-cp38.cp39.cp310.cp311.cp312.cp313.cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (15.9 MB view details)

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

intersystems_irispython-5.3.2-cp38.cp39.cp310.cp311.cp312.cp313.cp314-cp38.cp39.cp310.cp311.cp312.cp313.cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (16.2 MB view details)

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

intersystems_irispython-5.3.2-cp38.cp39.cp310.cp311.cp312.cp313.cp314-cp38.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.8CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

File details

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

File metadata

File hashes

Hashes for intersystems_irispython-5.3.2-cp38.cp39.cp310.cp311.cp312.cp313.cp314-cp38.cp39.cp310.cp311.cp312.cp313.cp314-win_amd64.whl
Algorithm Hash digest
SHA256 43feb7e23bc9f77db7bb140d1b55c22090b0c46691b570b1faaf6875baa6452d
MD5 1693c77b2bbb08640f7f7b57ca995079
BLAKE2b-256 212800b6b03b648005cb9c14dc75943e7cccce83eb5fd8fdba502028c25c7fc4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for intersystems_irispython-5.3.2-cp38.cp39.cp310.cp311.cp312.cp313.cp314-cp38.cp39.cp310.cp311.cp312.cp313.cp314-win32.whl
Algorithm Hash digest
SHA256 a250b21067c9e8275232ca798dcfe0719a970cd6ec9f2023923c810fffa46f41
MD5 b76b9c140354056659ad022fef2aaba3
BLAKE2b-256 37910e08555834de10f59810ef6c615af72c3f234920c70cc0421d455ba9c359

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for intersystems_irispython-5.3.2-cp38.cp39.cp310.cp311.cp312.cp313.cp314-cp38.cp39.cp310.cp311.cp312.cp313.cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 d5cb6efc3e2b9651f1c37539a3f69a823e80c32210d11d745cffad1eca4c7995
MD5 fb368f55186895b55a980242a09cacb3
BLAKE2b-256 27cdcef09a8310541d99fdbe89b2eccc21a6d776384325a9a6e740ad01e8461f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for intersystems_irispython-5.3.2-cp38.cp39.cp310.cp311.cp312.cp313.cp314-cp38.cp39.cp310.cp311.cp312.cp313.cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 25663d3cce7b414451a781ffaeb785e8f8439d0275920ffd4f05add2c056abfd
MD5 06f6435336162793d89d48a9c5404dbf
BLAKE2b-256 22cc2f066a0dc82fae884b655d2f862bd51dd21a4322d4b9f898117f74c010b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for intersystems_irispython-5.3.2-cp38.cp39.cp310.cp311.cp312.cp313.cp314-cp38.cp39.cp310.cp311.cp312.cp313.cp314-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8af5e31273ad97c391141111630e8303d510272360b609990a8c85e56a7850ac
MD5 78e0759193eb522f821b3beaae53f74b
BLAKE2b-256 d2230a7bc92e68480d523015eb454aa0ec73a33320975d10d5500ba54ccd124e

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