pinger_bot.config#
File for the Config dataclass.
Module Contents#
Classes#
Main dataclass for config. |
Attributes#
Base directory of the project. |
|
Initialized |
|
This is setuped |
|
Function for getting translated messages. |
- class Config[source]#
Main dataclass for config.
Note
If you will add more variables with value
???, do not forget them mock in tests!- locale: str = ru[source]#
Bot’s language, on which it speak.
At now we only support
en(English),uk(Ukrainian) andru(Russian).
- ping_interval: int = 5[source]#
Interval between pings, for collecting statistic of the server. In minutes.
- honeybadger_token: str | None[source]#
Token for Honeybadger.io. If you don’t have it, just leave it as
None.
- translation_obj[source]#
This is setuped
gettext.translationobject.
- gettext[source]#
Function for getting translated messages.
Examples
from pinger_bot.config import gettext as _ print(_("Hello World!"))
Will print
Hello World!,Привет Мир!orПривіт Світ!, depending onConfig.localeoption.