-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,3 +130,6 @@ dmypy.json | |
|
||
# vscode settings | ||
.vscode/ | ||
|
||
# jetbrains settings | ||
. idea |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import os | ||
from configparser import ConfigParser | ||
|
||
PATH = ".upbit/credentials" | ||
|
||
|
||
class Credentials: | ||
""" | ||
Credentials | ||
""" | ||
|
||
@staticmethod | ||
def home(): | ||
return os.path.expanduser("~") | ||
|
||
@staticmethod | ||
def get(profile: str = "default") -> dict: | ||
config = ConfigParser() | ||
config.read(f"{Credentials.home()}/{PATH}") | ||
|
||
return config._sections[profile] | ||
|
||
|
||
if __name__ == '__main__': | ||
print(Credentials.get()) |