inspectomop.inspector.Inspector.connect

Inspector.connect()

Provides a Connection to the underlying database from the connection pool.

Return type:

inspectomop.Connection

Notes

** The connect method is meant to be used in a with statement to ensure that Connection.close() is called and the appropriate cleanup happens after interacting with the underlying database. **

Examples

>>> with inspector.connect() as connection:
>>>     results = connection.execute(statement)