refactoring settings
This commit is contained in:
parent
8fbec57acb
commit
c4011f0e45
|
@ -0,0 +1,3 @@
|
|||
NETADM_CONFIG__RUN__HOST = "0.0.0.0"
|
||||
NETADM_CONFIG__RUN__PORT = 8080
|
||||
NETADM_CONFIG__RUN__RELOAD = 1
|
|
@ -15,9 +15,9 @@ STATIC_DIR = BASE_DIR / "web" / "static"
|
|||
|
||||
|
||||
class RunConfig(BaseModel):
|
||||
host: str = "0.0.0.0"
|
||||
port: int = 8000
|
||||
reload: bool = True
|
||||
host: str
|
||||
port: int
|
||||
reload: bool
|
||||
|
||||
|
||||
class SwaggerConfig(BaseModel):
|
||||
|
@ -39,7 +39,7 @@ class Settings(BaseSettings):
|
|||
env_nested_delimiter="__",
|
||||
env_prefix="NETADM_CONFIG__",
|
||||
)
|
||||
run: RunConfig = RunConfig()
|
||||
run: RunConfig
|
||||
swagger: SwaggerConfig = SwaggerConfig()
|
||||
|
||||
|
||||
|
|
|
@ -29,7 +29,8 @@ def parse_input(text: str) -> List[Dict[str, Union[int, str]]]:
|
|||
|
||||
|
||||
def start_check(
|
||||
text: str, result_type: str = "json"
|
||||
text: str,
|
||||
result_type: str = "json",
|
||||
) -> List[Dict[str, Union[int, str, bool]]] | List[str]:
|
||||
logging.info("")
|
||||
result = []
|
||||
|
|
Loading…
Reference in New Issue