hockey-blast-common-lib 0.1.23__tar.gz → 0.1.25__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/PKG-INFO +1 -1
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/db_connection.py +13 -9
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib.egg-info/PKG-INFO +1 -1
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/setup.py +1 -1
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/MANIFEST.in +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/README.md +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/__init__.py +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/aggregate_goalie_stats.py +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/aggregate_human_stats.py +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/aggregate_referee_stats.py +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/aggregate_skater_stats.py +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/dump_sample_db.sh +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/hockey_blast_sample_backup.sql.gz +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/models.py +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/options.py +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/restore_sample_db.sh +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/stats_models.py +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/utils.py +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/wsgi.py +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib.egg-info/SOURCES.txt +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib.egg-info/dependency_links.txt +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib.egg-info/requires.txt +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib.egg-info/top_level.txt +0 -0
- {hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/setup.cfg +0 -0
@@ -1,6 +1,10 @@
|
|
1
1
|
import os
|
2
2
|
from sqlalchemy import create_engine
|
3
3
|
from sqlalchemy.orm import sessionmaker
|
4
|
+
from dotenv import load_dotenv
|
5
|
+
|
6
|
+
# Load environment variables from .env file in the root directory of THE PROJECT (not this library)
|
7
|
+
load_dotenv()
|
4
8
|
|
5
9
|
# Database connection parameters per organization
|
6
10
|
DB_PARAMS = {
|
@@ -14,20 +18,20 @@ DB_PARAMS = {
|
|
14
18
|
|
15
19
|
"frontend-sample-db": {
|
16
20
|
"dbname": os.getenv("DB_NAME_SAMPLE", "hockey_blast_sample"),
|
17
|
-
"user": os.getenv("
|
18
|
-
"password": os.getenv("
|
19
|
-
"host": os.getenv("
|
20
|
-
"port": int(os.getenv("
|
21
|
+
"user": os.getenv("DB_USER", "frontend_user"),
|
22
|
+
"password": os.getenv("DB_PASSWORD", "hockey-blast"),
|
23
|
+
"host": os.getenv("DB_HOST", "localhost"),
|
24
|
+
"port": int(os.getenv("DB_PORT", 5432))
|
21
25
|
},
|
22
26
|
|
23
|
-
#
|
24
|
-
# Maybe figure out a way to do backup without it and make frontend_user own the sample?
|
27
|
+
# The section below is to handle recovery of sample DB where boss user is present, to avoid warnings and errors
|
28
|
+
# TODO: Maybe figure out a way to do backup without it and make frontend_user own the sample?
|
25
29
|
"boss": {
|
26
|
-
"dbname": os.getenv("
|
30
|
+
"dbname": os.getenv("DB_NAME", "hockey_blast"),
|
27
31
|
"user": os.getenv("DB_USER_BOSS", "boss"),
|
28
32
|
"password": os.getenv("DB_PASSWORD_BOSS", "boss"),
|
29
|
-
"host": os.getenv("
|
30
|
-
"port": int(os.getenv("
|
33
|
+
"host": os.getenv("DB_HOST", "localhost"),
|
34
|
+
"port": int(os.getenv("DB_PORT", 5432))
|
31
35
|
},
|
32
36
|
}
|
33
37
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name='hockey-blast-common-lib', # The name of your package
|
5
|
-
version='0.1.
|
5
|
+
version='0.1.25',
|
6
6
|
description='Common library for shared functionality and DB models',
|
7
7
|
author='Pavel Kletskov',
|
8
8
|
author_email='kletskov@gmail.com',
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/models.py
RENAMED
File without changes
|
{hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/options.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/utils.py
RENAMED
File without changes
|
{hockey_blast_common_lib-0.1.23 → hockey_blast_common_lib-0.1.25}/hockey_blast_common_lib/wsgi.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|