File tree 1 file changed +3
-2
lines changed 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 3
3
import json
4
4
import boto3
5
5
import logging
6
+ import urllib .parse
6
7
from enum import Enum
7
8
from datetime import datetime
8
9
from dotenv import find_dotenv , load_dotenv
@@ -67,8 +68,8 @@ def get_env_variable(
67
68
env_value = get_env_variable ("PDF_EXTRACT_IMAGES" , "False" ).lower ()
68
69
PDF_EXTRACT_IMAGES = True if env_value == "true" else False
69
70
70
- CONNECTION_STRING = f"postgresql+psycopg2://{ POSTGRES_USER } :{ POSTGRES_PASSWORD } @{ DB_HOST } :{ DB_PORT } /{ POSTGRES_DB } "
71
- DSN = f"postgresql://{ POSTGRES_USER } :{ POSTGRES_PASSWORD } @{ DB_HOST } :{ DB_PORT } /{ POSTGRES_DB } "
71
+ CONNECTION_STRING = f"postgresql+psycopg2://{ urllib . parse . quote_plus ( POSTGRES_USER ) } :{ urllib . parse . quote_plus ( POSTGRES_PASSWORD ) } @{ DB_HOST } :{ DB_PORT } /{ urllib . parse . quote_plus ( POSTGRES_DB ) } "
72
+ DSN = f"postgresql://{ urllib . parse . quote_plus ( POSTGRES_USER ) } :{ urllib . parse . quote_plus ( POSTGRES_PASSWORD ) } @{ DB_HOST } :{ DB_PORT } /{ urllib . parse . quote_plus ( POSTGRES_DB ) } "
72
73
73
74
## Logging
74
75
You can’t perform that action at this time.
0 commit comments