users table endpoints. auth to fix
This commit is contained in:
22
src/settings/settings.py
Normal file
22
src/settings/settings.py
Normal 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')))
|
||||
Reference in New Issue
Block a user