hockey-blast-common-lib 0.1.18__py3-none-any.whl → 0.1.19__py3-none-any.whl
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/db_connection.py +16 -17
- {hockey_blast_common_lib-0.1.18.dist-info → hockey_blast_common_lib-0.1.19.dist-info}/METADATA +1 -1
- {hockey_blast_common_lib-0.1.18.dist-info → hockey_blast_common_lib-0.1.19.dist-info}/RECORD +5 -5
- {hockey_blast_common_lib-0.1.18.dist-info → hockey_blast_common_lib-0.1.19.dist-info}/WHEEL +0 -0
- {hockey_blast_common_lib-0.1.18.dist-info → hockey_blast_common_lib-0.1.19.dist-info}/top_level.txt +0 -0
@@ -1,33 +1,32 @@
|
|
1
|
-
|
1
|
+
import os
|
2
2
|
from sqlalchemy import create_engine
|
3
3
|
from sqlalchemy.orm import sessionmaker
|
4
4
|
|
5
5
|
# Database connection parameters per organization
|
6
6
|
DB_PARAMS = {
|
7
7
|
"frontend": {
|
8
|
-
"dbname": "hockey_blast",
|
9
|
-
"user": "frontend_user",
|
10
|
-
"password": "hockey-blast",
|
11
|
-
"host": "localhost",
|
12
|
-
"port": 5432
|
8
|
+
"dbname": os.getenv("DB_NAME", "hockey_blast"),
|
9
|
+
"user": os.getenv("DB_USER", "frontend_user"),
|
10
|
+
"password": os.getenv("DB_PASSWORD", "hockey-blast"),
|
11
|
+
"host": os.getenv("DB_HOST", "localhost"),
|
12
|
+
"port": int(os.getenv("DB_PORT", 5432))
|
13
13
|
},
|
14
14
|
|
15
15
|
"frontend-sample-db": {
|
16
|
-
"dbname": "hockey_blast_sample",
|
17
|
-
"user": "frontend_user",
|
18
|
-
"password": "hockey-blast",
|
19
|
-
"host": "localhost",
|
20
|
-
"port": 5432
|
16
|
+
"dbname": os.getenv("DB_NAME_SAMPLE", "hockey_blast_sample"),
|
17
|
+
"user": os.getenv("DB_USER_SAMPLE", "frontend_user"),
|
18
|
+
"password": os.getenv("DB_PASSWORD_SAMPLE", "hockey-blast"),
|
19
|
+
"host": os.getenv("DB_HOST_SAMPLE", "localhost"),
|
20
|
+
"port": int(os.getenv("DB_PORT_SAMPLE", 5432))
|
21
21
|
},
|
22
22
|
|
23
23
|
"boss": {
|
24
|
-
"dbname": "hockey_blast",
|
25
|
-
"user": "boss",
|
26
|
-
"password": "WrongPassword",
|
27
|
-
"host": "localhost",
|
28
|
-
"port": 5432
|
24
|
+
"dbname": os.getenv("DB_NAME_BOSS", "hockey_blast"),
|
25
|
+
"user": os.getenv("DB_USER_BOSS", "boss"),
|
26
|
+
"password": os.getenv("DB_PASSWORD_BOSS", "WrongPassword"),
|
27
|
+
"host": os.getenv("DB_HOST_BOSS", "localhost"),
|
28
|
+
"port": int(os.getenv("DB_PORT_BOSS", 5432))
|
29
29
|
},
|
30
|
-
|
31
30
|
}
|
32
31
|
|
33
32
|
def get_db_params(config_name):
|
{hockey_blast_common_lib-0.1.18.dist-info → hockey_blast_common_lib-0.1.19.dist-info}/RECORD
RENAMED
@@ -3,7 +3,7 @@ hockey_blast_common_lib/aggregate_goalie_stats.py,sha256=d2qav46Rg2DNIYRj_Ubj1kp
|
|
3
3
|
hockey_blast_common_lib/aggregate_human_stats.py,sha256=88OMhTgQjzc9xIakf6kW9_lZwbSXkpsZy8C0pX-Wlq8,14229
|
4
4
|
hockey_blast_common_lib/aggregate_referee_stats.py,sha256=A0PTyEbPUjqfXxlJCDOVioFaQk9AyjjhiWEuRuu35v0,11036
|
5
5
|
hockey_blast_common_lib/aggregate_skater_stats.py,sha256=37fhgej9trukr8cGaK7DT1HoxBcp95qwsypYCCziqqc,15563
|
6
|
-
hockey_blast_common_lib/db_connection.py,sha256=
|
6
|
+
hockey_blast_common_lib/db_connection.py,sha256=OpW3UxSzHsS3zlLla6p6GcBc-vmjsusuzWByzQAIELE,1589
|
7
7
|
hockey_blast_common_lib/dump_sample_db.sh,sha256=MHPA-Ciod7wsvAlMbRtXFiyajgnEqU1xR59sJQ9UWR0,738
|
8
8
|
hockey_blast_common_lib/hockey_blast_sample_backup.sql.gz,sha256=JIk9FeWrEqHvmTLeueJtSkK2mNpg_xtonAMHDKlYe-4,1033693
|
9
9
|
hockey_blast_common_lib/models.py,sha256=GqQIGpanmFub97BoYCuaqDov2MxM4LMesUTxZ2edpvw,15393
|
@@ -12,7 +12,7 @@ hockey_blast_common_lib/restore_sample_db.sh,sha256=u2zKazC6vNMULkpYzI64nlneCWaG
|
|
12
12
|
hockey_blast_common_lib/stats_models.py,sha256=PI-mL1jmjCHLAvaATxSsjHEn05g9L_reA_YpsITPWjQ,21047
|
13
13
|
hockey_blast_common_lib/utils.py,sha256=OmeLVJSsjoBrE---w9MwXPKD3-UMZ9HB6a4YtsGDj30,3765
|
14
14
|
hockey_blast_common_lib/wsgi.py,sha256=wl1gf3KtaGSnYbCF5Z2xWwRXNSTQp43HoyhCAKJibI4,750
|
15
|
-
hockey_blast_common_lib-0.1.
|
16
|
-
hockey_blast_common_lib-0.1.
|
17
|
-
hockey_blast_common_lib-0.1.
|
18
|
-
hockey_blast_common_lib-0.1.
|
15
|
+
hockey_blast_common_lib-0.1.19.dist-info/METADATA,sha256=TCRYGrnYvIhwDje0hyNqSyWXFjeqCPBmUXvt9ViSCFA,318
|
16
|
+
hockey_blast_common_lib-0.1.19.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
17
|
+
hockey_blast_common_lib-0.1.19.dist-info/top_level.txt,sha256=wIR4LIkE40npoA2QlOdfCYlgFeGbsHR8Z6r0h46Vtgc,24
|
18
|
+
hockey_blast_common_lib-0.1.19.dist-info/RECORD,,
|
File without changes
|
{hockey_blast_common_lib-0.1.18.dist-info → hockey_blast_common_lib-0.1.19.dist-info}/top_level.txt
RENAMED
File without changes
|