rs_server_frontend package

Submodules

rs_server_frontend.main module

The frontend application.

class rs_server_frontend.main.Frontend

Bases: object

The frontend application.

get_openapi() dict

Returns the openapi specification.

Returns:

the openapi specification as a dict.

static load_openapi_spec() dict

Load the openapi specification.

The openapi is loaded from a json file. This json file location is given by the environment variable RSPY_OPENAPI_FILE.

An IOError is raised in case of errors during the file reading. A ValueError is raised in case of errors during the json parsing.

Returns:

the loaded openapi specification

exception rs_server_frontend.main.FrontendFailed

Bases: BaseException

Exception raised if the frontend initialization failed.

class rs_server_frontend.main.HealthSchema(*, healthy: bool)

Bases: BaseModel

Health status flag.

healthy: bool
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'healthy': FieldInfo(annotation=bool, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

rs_server_frontend.main.start_app() FastAPI

Start the starlette app.

Factory function that starts the application.

Returns:

the initialized application

Module contents

Frontend main package.