from os import getenv as env
import psycopg2, logging


log = logging.getLogger("blog")


log.info("connecting to database")
conn = psycopg2.connect(
    host = env("PG_HOST"),
    port = env("PG_PORT"),
    dbname = env("PG_DBNAME"),
    user= env("PG_USER"),
    password = env("PG_PASSWORD")
)
cursor = conn.cursor()