fastapi_tools.params.fastapi_tools_params
¶
FastapiTools project params.
Parameters are actual value of the config.
The class is a singleton, so it can be accessed from anywhere in the code.
There is a parameter regarding the environment type (stage and location), which is used to load different paths and other parameters based on the environment.
Classes:
-
FastapiToolsParams–FastapiTools project parameters.
Functions:
-
get_fastapi_tools_params–Get the fastapi_tools params.
-
get_fastapi_tools_paths–Get the fastapi_tools paths.
FastapiToolsParams
¶
FastapiTools project parameters.
Load the FastapiTools params.
Methods:
-
__repr__–Return the string representation of the object.
-
__str__–Return the string representation of the object.
-
load_config–Load the fastapi_tools configuration.
-
set_env_type–Set the environment type.
Source code in src/fastapi_tools/params/fastapi_tools_params.py
__repr__
¶
__str__
¶
load_config
¶
set_env_type
¶
Set the environment type.
Parameters:
-
env_type(EnvType | None, default:None) –The environment type. If None, it will be set from the environment variables. Defaults to None.