python_template_server.main

FastAPI template server using uvicorn.

Functions

run()

Serve the FastAPI application using uvicorn.

Classes

ExampleServer([config_filepath])

Example server inheriting from TemplateServer.

class python_template_server.main.ExampleServer(config_filepath=PosixPath('/home/runner/work/python-template-server/python-template-server/configuration/config.json'))[source]

Example server inheriting from TemplateServer.

__init__(config_filepath=PosixPath('/home/runner/work/python-template-server/python-template-server/configuration/config.json'))[source]

Initialize the ExampleServer by delegating to the template server.

Parameters:

config_filepath (Path) – Configuration filepath

validate_config(config_data)[source]

Validate configuration from the config.json file.

Return TemplateServerConfig:

Loaded configuration

Return type:

TemplateServerConfig

setup_routes()[source]

Set up API routes.

Return type:

None

python_template_server.main.run()[source]

Serve the FastAPI application using uvicorn.

Raises:

SystemExit – If configuration fails to load or SSL certificate files are missing

Return type:

None