_summary_
Definition at line 16 of file server.py.
◆ __init__()
None src.lib.server.Server.__init__ |
( |
| self, |
|
|
str | host = "0.0.0.0", |
|
|
int | port = 5000, |
|
|
int | success = 0, |
|
|
int | error = 84, |
|
|
str | app_name = "Area", |
|
|
bool | debug = False ) |
_summary_
This is the class Server, a class that contains the structures used to allow the uvicorn and fastapi combo to run successfully.
Args:
host (str, optional): _description_. Defaults to "0.0.0.0".
port (int, optional): _description_. Defaults to 5000.
character_folder (str, optional): _description_. Defaults to "".
usr_db_path (str, optional): _description_. Defaults to "".
success (int, optional): _description_. Defaults to 0.
error (int, optional): _description_. Defaults to 84.
app_name (str, optional): _description_. Defaults to "Desktop Pets".
debug (bool, optional): _description_. Defaults to False.
Definition at line 20 of file server.py.
◆ __del__()
None src.lib.server.Server.__del__ |
( |
| self | ) |
|
_summary_
The destructor of the class.
Definition at line 136 of file server.py.
◆ is_running()
bool src.lib.server.Server.is_running |
( |
| self | ) |
|
_summary_
The function in charge of checking if the server is running.
Returns:
bool: _description_: Returns True if the server is running.
Definition at line 169 of file server.py.
◆ main()
int src.lib.server.Server.main |
( |
| self | ) |
|
_summary_
The main function of the server.
This is the one in charge of starting the server.
Returns:
int: _description_
Definition at line 143 of file server.py.
◆ stop_server()
None src.lib.server.Server.stop_server |
( |
| self | ) |
|
_summary_
The function in charge of stopping the server.
Definition at line 178 of file server.py.
◆ debug
bool src.lib.server.Server.debug = debug |
◆ disp
Disp src.lib.server.Server.disp |
Initial value:= Disp(
TOML_CONF,
FILE_DESCRIPTOR,
SAVE_TO_FILE,
FILE_NAME,
debug=self.debug,
logger=self.__class__.__name__
)
Definition at line 40 of file server.py.
◆ error
int src.lib.server.Server.error = error |
◆ host
str src.lib.server.Server.host = host |
◆ port
int src.lib.server.Server.port = port |
◆ runtime_data_initialised
RuntimeData src.lib.server.Server.runtime_data_initialised |
Initial value:= RuntimeData(
host=self.host,
port=self.port,
app_name=app_name,
error=self.error,
success=self.success
)
Definition at line 49 of file server.py.
◆ success
int src.lib.server.Server.success = success |
The documentation for this class was generated from the following file: