Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- assert os.environ['PGUSER'] != '', os.environ
- connection_string = \
- 'postgresql://{user}:{password}@{host}/{database}'.format(
- user=os.environ['PGUSER'],
- password=os.environ['PGPASSWORD'],
- host=os.environ['PGHOST'],
- database=os.environ['PGDATABASE'])
- from sqlalchemy import create_engine
- engine = create_engine(connection_string)
Add Comment
Please, Sign In to add comment