users table endpoints. auth to fix

This commit is contained in:
2025-07-25 18:38:24 +03:00
parent e729e84872
commit 08d2ebb1b7
21 changed files with 734 additions and 2 deletions

22
src/settings/settings.py Normal file
View File

@ -0,0 +1,22 @@
from decouple import config
def str_to_bool(string: str) -> bool:
if string.lower() == 'true':
return True
return False
# database
db_host = str(config('db_host', default='127.0.0.1'))
db_port = int(config('db_port', default=5432))
db_name = str(config('db_name', default='postgres'))
db_user = str(config('db_user', default='postgres'))
db_password = str(config('db_password', default='postgres'))
# auth
secret_key = str(config('secret_key'))
algorithm = str(config('algorithm', 'HS256'))
access_token_expiration_time = int(config('access_token_expiration_time', default=10080))
# other settings
swagger_enabled = str_to_bool(str(config('swagger_enabled', 'false')))