florist.api.server module

FLorist server FastAPI endpoints and routes.

lifespan(app)[source]

Set up function for app startup and shutdown.

Return type:

AsyncGenerator[Any, Any]

list_clients(strategy)[source]

Return a list of all available clients by strategy.

Parameters:

strategy (Strategy) – (Strategy) The strategy to find the compatible clients.

Return type:

JSONResponse

Returns:

(JSONResponse) A JSON response with a list of all elements in the api.clients.common.Client enum that are compatible with the given strategy.

list_models()[source]

Return a list of all available models.

Return type:

JSONResponse

Returns:

(JSONResponse) A JSON response with a list of all elements in the api.servers.common.Model enum.

list_optimizers()[source]

Return a list of all available optimizers.

Return type:

JSONResponse

Returns:

(JSONResponse) A JSON response with a list of all elements in the api.clients.optimizers.Optimizer enum.

list_strategies()[source]

Return a list of all available strategies.

Return type:

JSONResponse

Returns:

(JSONResponse) A JSON response with a list of all elements in the api.servers.strategy.Strategies enum.