Connecting to InterSystems Cloud Services with Python
See how to connect to InterSystems Cloud Services from your Python application using the InterSystems DB-API driver interface.
See how to connect to InterSystems Cloud Services from your Python application using the InterSystems DB-API driver interface.
Use the code below to connect to InterSystems Cloud Services using variables or a connection string.
import iris def main(): host = "localhost" port = 1972 namespace = "USER" username = "SQLAdmin" password = "deployment-password" connection = iris.connect(host, port, namespace, username, password) # when finished, use the line below to close the connection # connection.close() if __name__ == "__main__": main()
import iris def main(): connection_string = "localhost:1972/USER" username = "SQLAdmin" password = "deployment-password" connection = iris.connect(connection_string, username, password) # when finished, use the line below to close the connection # connection.close() if __name__ == "__main__": main()
Having an issue with the learning site? Want to provide feedback on a course? Contact us by emailing online.training@intersystems.com.
Please include all relevant information, including the page or course you are having trouble with, and any necessary screenshots.