-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: alfred richardsn <rchrdsn@protonmail.ch>
- Loading branch information
Showing
11 changed files
with
77 additions
and
40 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,5 +1,5 @@ | ||
# Project files | ||
config.py | ||
config.ini | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
|
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,22 @@ | ||
[Connection] | ||
token_filename = /run/secrets/tbtoken | ||
server_host = example.com | ||
server_port = 5000 | ||
webhook_path = /tellerbot/webhook | ||
database_name = tellerbot | ||
|
||
[Logging] | ||
logger_level = INFO | ||
log_filename = /var/log/tellerbot.log | ||
|
||
[Chat IDs] | ||
support = -123456789 | ||
exceptions = -1234567890123 | ||
|
||
[Orders] | ||
count = 10 | ||
limit_hours = 24 | ||
limit_count = 10 | ||
|
||
[Blockchain] | ||
wif_filename = /run/secrets/wif.json |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -50,4 +50,3 @@ | |
html_static_path = ["_static"] | ||
|
||
master_doc = "index" | ||
autodoc_mock_imports = ["src.config"] |
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
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 @@ | ||
from configparser import ConfigParser | ||
from pathlib import Path | ||
|
||
ROOT_DIR = Path(__file__).parent.parent.resolve() | ||
|
||
parser = ConfigParser() | ||
parser.read(ROOT_DIR / "config.ini") | ||
|
||
TOKEN_FILE = parser.get("Connection", "token_filename") | ||
SERVER_HOST = parser.get("Connection", "server_host") | ||
SERVER_PORT = parser.getint("Connection", "server_port") | ||
WEBHOOK_PATH = parser.get("Connection", "webhook_path") | ||
DATABASE_NAME = parser.get("Connection", "database_name") | ||
|
||
LOGGER_LEVEL = parser.get("Logging", "logger_level") | ||
LOG_FILENAME = parser.get("Logging", "log_filename") | ||
|
||
SUPPORT_CHAT_ID = parser.getint("Chat IDs", "support") | ||
EXCEPTIONS_CHAT_ID = parser.getint("Chat IDs", "exceptions") | ||
|
||
ORDERS_COUNT = parser.getint("Orders", "count") | ||
ORDERS_LIMIT_HOURS = parser.getint("Orders", "limit_hours") | ||
ORDERS_LIMIT_COUNT = parser.getint("Orders", "limit_count") | ||
|
||
WIF_FILENAME = parser.get("Blockchain", "wif_filename") |
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
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