This repository has been archived by the owner on Nov 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved utility functions from __init__
- Loading branch information
1 parent
0818f20
commit d373bc8
Showing
4 changed files
with
28 additions
and
28 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 |
---|---|---|
@@ -1,25 +0,0 @@ | ||
import os | ||
from . import exceptions | ||
|
||
|
||
def _get_env_var(key): | ||
try: | ||
return os.environ[key] | ||
except KeyError: | ||
raise exceptions.MissingConfig('Missing MKM env var: ' + key) | ||
|
||
|
||
def get_mkm_app_token(): | ||
return _get_env_var('MKM_APP_TOKEN') | ||
|
||
|
||
def get_mkm_app_secret(): | ||
return _get_env_var('MKM_APP_SECRET') | ||
|
||
|
||
def get_mkm_access_token(): | ||
return _get_env_var('MKM_ACCESS_TOKEN') | ||
|
||
|
||
def get_mkm_access_token_secret(): | ||
return _get_env_var('MKM_ACCESS_TOKEN_SECRET') | ||
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
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,25 @@ | ||
import os | ||
from . import exceptions | ||
|
||
|
||
def _get_env_var(key): | ||
try: | ||
return os.environ[key] | ||
except KeyError: | ||
raise exceptions.MissingConfig('Missing MKM env var: ' + key) | ||
|
||
|
||
def get_mkm_app_token(): | ||
return _get_env_var('MKM_APP_TOKEN') | ||
|
||
|
||
def get_mkm_app_secret(): | ||
return _get_env_var('MKM_APP_SECRET') | ||
|
||
|
||
def get_mkm_access_token(): | ||
return _get_env_var('MKM_ACCESS_TOKEN') | ||
|
||
|
||
def get_mkm_access_token_secret(): | ||
return _get_env_var('MKM_ACCESS_TOKEN_SECRET') |
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