Metadata-Version: 2.4
Name: intersystems_irispython
Version: 5.1.2
Summary: InterSystems IRIS Python SDK Kit
Author: InterSystems Corporation
Author-email: support@intersystems.com
Project-URL: Homepage, https://www.intersystems.com/
Project-URL: License, https://www.intersystems.com/IERTU/
Project-URL: Documentation, https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=PAGE_python_native
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: Other/Proprietary License
Classifier: Topic :: Database
Classifier: Topic :: Database :: Front-Ends
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
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 :: Implementation :: CPython
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE-OpenSSL.txt
License-File: LICENSE.txt
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-python
Dynamic: summary

# intersystems-irispython [![PyPI version](https://img.shields.io/pypi/v/intersystems-irispython?logo=pypi)](https://pypi.org/project/intersystems-irispython/)

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install intersystems-irispython.

```bash
pip install intersystems-irispython
```

## Usage

### Native Connections
```python
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

```python

# >>> On a native connection object "conn" <<<

# 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](https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=BPYNAT_pyapi)

## Documentation

Full documentation is available at [InterSystems Native SDK for Python](https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=PAGE_python_native)

## 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/](https://www.intersystems.com/IERTU/).

## Release Notes

#### Version 5.1.2
1. Updated rowcount attribute to return -1 if the Cursor object is closed.
