generated from bomzheg/aiogram_template
-
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.
- Loading branch information
ychebyshev
committed
Jan 9, 2024
1 parent
c8161a1
commit 1bf4423
Showing
1 changed file
with
24 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,24 @@ | ||
import logging | ||
import sys | ||
|
||
from shvatka.api.config.parser.main import load_config | ||
from shvatka.api.dependencies import AuthProvider | ||
from shvatka.api.main_factory import ( | ||
get_paths, | ||
) | ||
from shvatka.common.config.parser.logging_config import setup_logging | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
def generate(): | ||
paths = get_paths() | ||
|
||
setup_logging(paths) | ||
config = load_config(paths) | ||
auth = AuthProvider(config.auth) | ||
return auth.get_password_hash(sys.argv[1]) | ||
|
||
|
||
if __name__ == "__main__": | ||
print(generate()) # noqa: T201 |