kbws.models.availability module#
Pydantic request models for the FDSN availability service.
Some availability options are accepted for FDSN compatibility but are currently ignored by KBWS.
- class kbws.models.availability.AvailabilityExtent(*, starttime: datetime | date, endtime: datetime | date, network: str, station: str, location: str, channel: str, quality: str | None = None, merge: str | None = None, orderby: Literal['nslc_time_quality_samplerate', 'latestupdate', 'latestupdate_desc', 'timespancount', 'timespancount_desc'] = 'nslc_time_quality_samplerate', limit: Annotated[int | None, Ge(ge=0)] = None, includerestricted: bool = False, format: Literal['text', 'json', 'request'] = 'text', nodata: NoData = '204')[source]#
Bases:
BaseModelFDSN availability parameters shared by
queryandextent.- channel: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Channel code or wildcard; comma-separated values are allowed.', examples='BHZ')]#
- endtime: Annotated[datetime | date, FieldInfo(annotation=NoneType, required=True, description='Limit results to samples on or before this UTC time.', examples='2009-06-01T10:30:00.000')]#
- format: Annotated[Literal['text', 'json', 'request'], FieldInfo(annotation=NoneType, required=True, description='Response format.')]#
- includerestricted: Annotated[bool, FieldInfo(annotation=NoneType, required=True, description='Include restricted data when true.')]#
- limit: Annotated[int | None, FieldInfo(annotation=NoneType, required=True, description='Maximum number of time spans to return. Not implemented yet and silently ignored.', metadata=[Ge(ge=0)])]#
- location: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Location code or wildcard; comma-separated values are allowed. Not implemented yet and silently ignored.', examples='00')]#
- merge: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, description='Comma-separated merge flags: samplerate, quality, and/or overlap. Quality and overlap merging are not implemented yet and silently ignored.')]#
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- network: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Network code or wildcard; comma-separated values are allowed.', examples='IU')]#
- nodata: Annotated[NoData, FieldInfo(annotation=NoneType, required=True, description='HTTP status for no matching data: 204 or 404.')]#
- orderby: Annotated[Literal['nslc_time_quality_samplerate', 'latestupdate', 'latestupdate_desc', 'timespancount', 'timespancount_desc'], FieldInfo(annotation=NoneType, required=True, description='Order in which availability rows are returned. Not implemented yet and silently ignored.')]#
- quality: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, description='Quality code or wildcard; support is data-center dependent. Not implemented yet and silently ignored.')]#
- starttime: Annotated[datetime | date, FieldInfo(annotation=NoneType, required=True, description='Limit results to samples on or after this UTC time.', examples='2009-05-01T06:30:00.000')]#
- station: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Station code or wildcard; comma-separated values are allowed.', examples='ANMO')]#
- class kbws.models.availability.AvailabilityQuery(*, starttime: datetime | date, endtime: datetime | date, network: str, station: str, location: str, channel: str, quality: str | None = None, merge: str | None = None, orderby: Literal['nslc_time_quality_samplerate', 'latestupdate', 'latestupdate_desc', 'timespancount', 'timespancount_desc'] = 'nslc_time_quality_samplerate', limit: Annotated[int | None, Ge(ge=0)] = None, includerestricted: bool = False, format: Literal['text', 'json', 'request'] = 'text', nodata: NoData = '204', mergegaps: Annotated[float, Ge(ge=0.0)] = 0.0, show: Literal['latestupdate'] | None = None)[source]#
Bases:
AvailabilityExtentFDSN availability parameters for the
querymethod.- mergegaps: Annotated[float, FieldInfo(annotation=NoneType, required=True, description='Merge spans separated by no more than this many seconds.', metadata=[Ge(ge=0.0)])]#
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- show: Annotated[Literal['latestupdate'] | None, FieldInfo(annotation=NoneType, required=True, description='Include the latest contributing update time.')]#