Skip to content
Snippets Groups Projects
Commit 5548c5f6 authored by Michael Bücker's avatar Michael Bücker
Browse files

Update password coding

parent 30e1fc10
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ import os
from dotenv import load_dotenv
import sqlalchemy
import pandas as pd
from urllib.parse import quote_plus
load_dotenv("/usr/src/app/.env")
......@@ -19,7 +20,7 @@ class Database:
def db_connect(db_name):
hostname=os.getenv("DB_HOST")
user=os.getenv("DB_USER")
password=os.getenv("DB_PASSWORD")
password=quote_plus(os.getenv("DB_PASSWORD"))
conn = sqlalchemy.create_engine(f'postgresql+psycopg2://{user}:{password}@{hostname}/{db_name}')
return conn
......
......@@ -3,4 +3,5 @@ jupyterlab-gitlab==3.0.0
psycopg2-binary
psycopg2
python-dotenv
sqlalchemy
\ No newline at end of file
sqlalchemy
urllib
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment