python_template_server.routers.template_server_router

Template server router with health and login endpoints.

Classes

TemplateServerRouter(prefix)

Router for the template server with health and login endpoints.

class python_template_server.routers.template_server_router.TemplateServerRouter(prefix)[source]

Router for the template server with health and login endpoints.

setup_routes()[source]

Set up the API routes for the template server.

Return type:

None

async get_health(request)[source]

Get server health.

Parameters:

request (Request) – The incoming HTTP request

Return GetHealthResponse:

Health status response

Raises:

HTTPException – If the server token is not configured

Return type:

GetHealthResponse

async get_login(request)[source]

Handle user login and return a success response.

Parameters:

request (Request) – The incoming HTTP request

Return GetLoginResponse:

Login success response

Raises:

HTTPException – If the server token is not configured

Return type:

GetLoginResponse