Minimal psycopg2 wrapper for easier interfacing with databases
Run pip install psycopg2-contextmanager
from psycopg2_contextmanager import database_connection with database_connection(<database_connection_string>) as cursor: cursor.execute(<query>)
Commits are handled automatically. If the query fails, the package will log the exception along with the line Unable to run query and re-raise it.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for psycopg2-contextmanager-1.0.3.tar.gz