Skip to content

intersystems/Samples-Python-DBAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Samples-Python-DBAPI

This code shows how to run basic SQL from Python to query InterSystems IRIS databases using the Python DB-API.

This sample is used in Querying InterSystems IRIS with the Python DB-API.

Set Up

  1. Prepare a running instance of InterSystems IRIS, or launch a lab from the exercise associated with this repository.
  2. Install the intersystems-irispython library in your Python environment using the following command:
    pip install intersystems-irispython
  1. Update connection information in the DBAPIQuickstart.py file to match your InterSystems IRIS instance. For example:
    HOST = "localhost"
    PORT = 1972
    USER = "tech"
    PASSWORD = "demo"
    NAMESPACE = "USER"

Run the Sample

  1. You can run the DBAPIQuickstart.py file to query the InterSystems IRIS database via the Python DB-API.
    cd src
    python DBAPIQuickstart.py

Keep Exploring

To continue with a video about Python development strategies, see Evaluating Python Development Strategies.

About

RITM0043631

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages