-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rahul Gopathi <[email protected]>
- Loading branch information
1 parent
61c75e6
commit 25e6555
Showing
3 changed files
with
23 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# database configs | ||
DB_HOST=localhost | ||
DB_USER=user | ||
DB_PASSWORD=password | ||
DB_NAME=aws_database | ||
|
||
# offer names to process | ||
OFFER_NAMES_TO_PROCESS=AmazonS3,AmazonRDS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
from sqlalchemy import create_engine | ||
from sqlalchemy.orm import sessionmaker | ||
from decouple import config | ||
|
||
# Set up the database connection | ||
DATABASE_URL = "mysql+mysqlconnector://aws:[email protected]/aws_database" | ||
DATABASE_URL = f"mysql+mysqlconnector://{config('DB_USER')}:{config('DB_PASSWORD')}@{config('DB_HOST')}/{config('DB_NAME')}" | ||
engine = create_engine(DATABASE_URL) | ||
|
||
# Create a session to interact with the database | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters