Skip to content

Instantly share code, notes, and snippets.

import psycopg2
class query():
def __init__(self):
"""Set credential information here, or pass the information as
arguments to the class, or read your credentials from environment
variables. Anyway you choose to handle crendtials, pass them to these
class variables."""
self.DB_USER = '<username>'
@alove
alove / Dockerfile
Last active May 3, 2019 16:44
Docker & makefile
FROM python:3.7.3-alpine3.9
RUN apk add build-base
RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev
COPY requirements.txt /myapp/requirements.txt
COPY Makefile /myapp/Makefile
RUN python3 -m pip install virtualenv
RUN cd myapp && make venv