rs_server_common.schemas package
Submodules
rs_server_common.schemas.download_status_schema module
Pydantic schemas for DownloadStatus.
- class rs_server_common.schemas.download_status_schema.DownloadStatusBase(*, product_id: str, name: str, available_at_station: datetime | None)
Bases:
BaseModel
DownloadStatus fields that are known when both reading and creating the object.
- available_at_station: datetime | None
- 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]] = {'available_at_station': FieldInfo(annotation=Union[datetime, NoneType], required=True), 'name': FieldInfo(annotation=str, required=True), 'product_id': FieldInfo(annotation=str, 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.
- name: str
- product_id: str
- class rs_server_common.schemas.download_status_schema.ReadDownloadStatus(*, product_id: str, name: str, available_at_station: datetime | None, db_id: int, download_start: datetime | None = None, download_stop: datetime | None = None, status: EDownloadStatus, status_fail_message: str | None = None)
Bases:
DownloadStatusBase
DownloadStatus fields that are known when reading but not when creating the object.
- db_id: int
- download_start: datetime | None
- download_stop: datetime | None
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'use_enum_values': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'available_at_station': FieldInfo(annotation=Union[datetime, NoneType], required=True), 'db_id': FieldInfo(annotation=int, required=True), 'download_start': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None), 'download_stop': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None), 'name': FieldInfo(annotation=str, required=True), 'product_id': FieldInfo(annotation=str, required=True), 'status': FieldInfo(annotation=EDownloadStatus, required=True), 'status_fail_message': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- serialize_dt(dt: datetime | None, _info)
Called by the HTTP endpoint to convert a datetime into a JSON string.
- status: EDownloadStatus
- status_fail_message: str | None
rs_server_common.schemas.health_schema module
HealthSchema schema implementation.
- class rs_server_common.schemas.health_schema.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.
Module contents
HTTP response schemas.