From 4bbdbcbf285476fb8a359d625014f48f586a3020 Mon Sep 17 00:00:00 2001 From: OJ Adeyemi Date: Tue, 7 May 2024 00:03:27 -0400 Subject: [PATCH] updated dependencies --- .gitignore | 3 ++- config.py | 9 ++++++++- data_pipeline/__init__.py | 10 ++++++++-- requirements.txt | 12 ++++++------ 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index c2f25e9..5c33218 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -virtualenv +virtualenv/ +venv/ .env # Flask stuff: __pycache__ diff --git a/config.py b/config.py index 160fb09..9ff5cbf 100644 --- a/config.py +++ b/config.py @@ -1,7 +1,14 @@ """Configurations file""" import os -mysqldatabase = f"mysql+pymysql://usportsballwebapp:{os.environ.get('USPORT_BBALL_PASSWORD')}.@localhost/usports_bball" +# Load environment variables from .env file +from dotenv import load_dotenv +load_dotenv() + +# Retrieve the environment variable +password = os.getenv("USPORT_BBALL_PASSWORD") + +mysqldatabase = f"mysql+pymysql://usportsballwebapp:{password}.@localhost/usports_bball" class Config: """Default Configuration""" DEBUG = False diff --git a/data_pipeline/__init__.py b/data_pipeline/__init__.py index 4be27e4..2e424ed 100644 --- a/data_pipeline/__init__.py +++ b/data_pipeline/__init__.py @@ -1,7 +1,13 @@ import os from .database_update import update_usports_bball_db +# Load environment variables from .env file +from dotenv import load_dotenv +load_dotenv() + +# Retrieve the environment variable +password = os.getenv("USPORT_BBALL_PASSWORD") + def update_db(): """ Update Database""" - mysql_password = os.environ.get('USPORT_BBALL_PASSWORD') - update_usports_bball_db(mysql_password) + update_usports_bball_db(password) diff --git a/requirements.txt b/requirements.txt index 28d8d86..c5b98f5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,20 +1,20 @@ beautifulsoup4==4.12.3 -blinker==1.7.0 +blinker==1.8.2 certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 click==8.1.7 colorama==0.4.6 -cryptography==42.0.5 +cryptography==42.0.7 Flask==3.0.3 Flask-SQLAlchemy==3.1.1 Flask-WTF==1.2.1 greenlet==3.0.3 idna==3.7 itsdangerous==2.2.0 -Jinja2==3.1.3 +Jinja2==3.1.4 MarkupSafe==2.1.5 -mysql-connector-python==8.3.0 +mysql-connector-python==8.4.0 numpy==1.26.4 pandas==2.2.2 pycparser==2.22 @@ -25,10 +25,10 @@ pytz==2024.1 requests==2.31.0 six==1.16.0 soupsieve==2.5 -SQLAlchemy==2.0.29 +SQLAlchemy==2.0.30 typing_extensions==4.11.0 tzdata==2024.1 urllib3==2.2.1 usports-basketball==1.0.1 -Werkzeug==3.0.2 +Werkzeug==3.0.3 WTForms==3.1.2