intersystems-community/iris-agentic-dev/irispython-connector

Claude Code and agent skill by intersystems-community/iris-agentic-dev

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Connect Python to IRIS from outside IRIS over TCP — DB-API, SQLAlchemy, and pandas. Covers the port confusion, keyword-arg segfault, FETCH FIRST crash, and type normalization blockers that trip up every first-time user.

Install

npx vskill@latest install intersystems-community/iris-agentic-dev/irispython-connector

SKILL.md

This skill vs. iris-embedded-python

This skilliris-embedded-python
Python locationExternal process, connects over TCPInside IRIS (Embedded Python)
Importintersystems_irispython.dbapiimport iris
ConnectionSuperserver port (default 1972)In-process, no network
Use whenRunning .py scripts, notebooks, external servicesObjectScript calls Python, or Python calls iris.sql

If you see import iris in the code, use the iris-embedded-python skill instead.


Connection — which port

Always use the superserver port, not the web port.

Run check_config to see both ports:

text
iris-agentic-dev tool check_config --args '{}'

Look for iris_port (superserver, default 1972), not web_port (default 52773/52780).

Docker example: -p 11975:1972 → superserver port on the host is 11975.

Install
bash
pip install intersystems-irispython
DB-API — positional args only
python
import intersystems_irispython.dbapi as dbapi
# CORRECT — positional args
conn = dbapi.connect("localhost", 11975, "USER", "_SYSTEM", "SYS")
# WRONG — keyword args cause SIGSEGV on irispython >= 5.x outside an IRIS install
# conn = dbapi.connect(hostname="localhost", port=11975, ...) # DO NOT USE
SQLAlchemy
python
from sqlalchemy import create_engine
engine = create_engine("iris://_SYSTEM:SYS@localhost:11975/USER")

Crash-triggering patterns — avoid all three

PatternSymptomFix
dbapi.connect(hostname=..., port=...) keyword argsSIGSEGV / exit 139Use positional args: connect("host", port, "ns", "user", "pass")
SELECT ... FETCH FIRST n ROWS ONLYSIGSEGV in C extensionUse SELECT TOP n ... instead
pd.read_sql(query, conn)SIGSEGV on some queriesUse cursor.execute(); cursor.fetchall()

These are not edge cases — all three crash hard with no Python traceback. If you see exit 139 or SIGSEGV, check this table first.


Type normalization

DB-API does not normalize aggregate return types. COUNT, AVG, SUM may return Decimal, str, or float depending on the query. Cast explicitly:

python
cursor.execute("SELECT COUNT(*), AVG(Fare) FROM MyTable")
row = cursor.fetchone()
count = int(row[0]) if row[0] is not None else 0
avg_fare = float(row[1]) if row[1] is not None else 0.0

IRISINSTALLDIR warning suppression

If you see a warning about IRISINSTALLDIR not being set, it is cosmetic. Suppress it before the import:

python
import os
os.environ.setdefault("IRISINSTALLDIR", "")
import intersystems_irispython.dbapi as dbapi

IRIS SQL dialect differences

SQL featureIRIS behavior
Row limitSELECT TOP n ... — FETCH FIRST n ROWS ONLY causes SIGSEGV
Reserved wordsCOUNT, HOUR, YEAR, DATE, TIME cannot be used as column aliases
Schema discoveryINFORMATION_SCHEMA available and standard
AggregatesCOUNT, SUM, AVG, MIN, MAX work
Standard functionsCOALESCE, CASE, ROUND, NULLIF all work

Quick-start (10 lines)

Minimal working example against the local dev container (iris-dev-iris, superserver port 11975):

python
import os
os.environ.setdefault("IRISINSTALLDIR", "")
import intersystems_irispython.dbapi as dbapi
conn = dbapi.connect("localhost", 11975, "USER", "_SYSTEM", "SYS")
cursor = conn.cursor()
cursor.execute("SELECT TOP 5 ID, Name FROM %Dictionary.ClassDefinition")
for row in cursor.fetchall():
print(row[0], row[1])
cursor.close()
conn.close()

Swap 11975 for whatever iris_port shows in check_config output for your environment.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/intersystems-community/iris-agentic-dev/irispython-connector/badge)](https://verified-skill.com/skills/intersystems-community/iris-agentic-dev/irispython-connector)

Something wrong with this skill or its page? Tell us.