Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
BastienGauthier committed Jan 28, 2024
1 parent 3811c7c commit 7115990
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions e_cartomobile/infra/database/sql_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@
from sqlalchemy import create_engine
import streamlit as st


def get_db_environment():
try:
return st.secrets.db_credentials
except AttributeError:
return {
'database': os.environ.get("DATABASE"),
'user': os.environ.get("USER"),
'password': os.environ.get("PASSWORD"),
'host': os.environ.get("HOST"),
'port': os.environ.get("PORT"),
}
"database": os.environ.get("DATABASE"),
"user": os.environ.get("USER"),
"password": os.environ.get("PASSWORD"),
"host": os.environ.get("HOST"),
"port": os.environ.get("PORT"),
}


@st.cache_resource(ttl=3600)
def get_db_connector():
Expand Down

0 comments on commit 7115990

Please sign in to comment.