meeshkan-hosted-db

Utility package to access a Cloud SQL database on meeshkan.io


License
MIT
Install
pip install meeshkan-hosted-db==0.2

Documentation

meeshkan-hosted-db

Utility python package to access a Cloud SQL for PostgreSQL database using psycopg2 on meeshkan.io.

from meeshkan_hosted_db import connect_to_db

with connect_to_db() as db:
    with db.cursor() as cursor:
        cursor.execute("SELECT NOW() as now;")
        result = cursor.fetchall()
    current_time = result[0][0]