Skip to main content

A libray for use with SQLAlchemy to count queires, log queries, etc...

Project description


A Python context manager for use with SQLAlchemy.


  • Count the number of queires issued.
  • Capture/print the statements/queries issued.


pip install dbinspector


with DBInspector(conn) as inspector:
    conn.execute("SELECT 1")
    conn.execute("SELECT 1")

    # Get query count
    assert inspector.get_count() == 2

    # Print queries issued

    # Example pretty printed output:
    QUERY #1
    SELECT 1

    QUERY #2
    SELECT 1


DBInspector.get_count() -> int


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dbinspector, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size dbinspector-0.1.1-py3-none-any.whl (3.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size dbinspector-0.1.1.tar.gz (2.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page