File tree 1 file changed +14
-19
lines changed
1 file changed +14
-19
lines changed Original file line number Diff line number Diff line change 1
- from pydantic import BaseSettings , Field
1
+ from pydantic_settings import BaseSettings
2
+ from pydantic import Field
2
3
from pathlib import Path
3
4
from typing import Optional
4
5
5
6
class Settings (BaseSettings ):
6
- HOST : str
7
- PORT : int
8
- WORKERS : int
9
-
10
- FFMPEG_PATH : Path
11
- FFPROBE_PATH : Path
12
- VMAF_PATH : Path
13
- MODE : str
7
+ HOST : str = Field ( "0.0.0.0" )
8
+ PORT : int = Field ( 8000 )
9
+ WORKERS : int = Field ( 4 )
10
+
11
+ FFMPEG_PATH : Path = Field ( Path ( "/usr/bin/ffmpeg" ))
12
+ FFPROBE_PATH : Path = Field ( Path ( "/usr/bin/ffprobe" ))
13
+ VMAF_PATH : Path = Field ( Path ( "/usr/local/bin/ffmpeg-quality-metrics" ))
14
+ MODE : str = Field ( "local" )
14
15
SSH_HOST : Optional [str ]
15
16
SSH_USER : Optional [str ]
16
17
SSH_KEY_PATH : Optional [Path ]
17
18
18
19
AWS_ACCESS_KEY_ID : Optional [str ]
19
20
AWS_SECRET_ACCESS_KEY : Optional [str ]
20
- AWS_REGION : str
21
+ AWS_REGION : str = Field ( "us-east-1" )
21
22
22
- SECRET_KEY : str
23
- ALGORITHM : str
24
- ACCESS_TOKEN_EXPIRE_MINUTES : int
23
+ SECRET_KEY : str = Field (...)
24
+ ALGORITHM : str = Field ( "HS256" )
25
+ ACCESS_TOKEN_EXPIRE_MINUTES : int = Field ( 60 )
25
26
26
27
class Config :
27
28
env_file = ".env"
28
29
29
30
settings = Settings ()
30
-
31
-
32
-
33
-
34
-
35
-
You can’t perform that action at this time.
0 commit comments