-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e414f6
commit c6bcff6
Showing
1 changed file
with
21 additions
and
0 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,21 @@ | ||
import json | ||
|
||
|
||
class Config(object): | ||
|
||
def __init__(self): | ||
with open("../config.json") as target: | ||
self.config = json.load(target) | ||
target.close() | ||
|
||
def get_db_url(self): | ||
return self.config["DB_URL"] | ||
|
||
def get_log_level(self): | ||
return self.config["log_level"] | ||
|
||
def is_debug_mode(self): | ||
return self.config["debug_mode"] | ||
|
||
|
||
config = Config() |