kbws.models.station module#

Pydantic request models for the FDSN station service.

The service supports network, station, channel, and response detail levels; several FDSN metadata filters remain accepted but ignored.

class kbws.models.station.StationFormat(*values)[source]#

Bases: str, Enum

css = 'css'#
sql = 'sql'#
text = 'text'#
xml = 'xml'#
class kbws.models.station.StationLevel(*values)[source]#

Bases: str, Enum

channel = 'channel'#
network = 'network'#
response = 'response'#
station = 'station'#
class kbws.models.station.StationQuery(*, starttime: datetime | date | None = None, endtime: datetime | date | None = None, network: str | None = None, station: str | None = None, location: str | None = None, channel: str | None = None, minlatitude: Annotated[float | None, Ge(ge=-90.0), Le(le=90.0)] = None, maxlatitude: Annotated[float | None, Ge(ge=-90.0), Le(le=90.0)] = None, minlongitude: Annotated[float | None, Ge(ge=-180.0), Le(le=180.0)] = None, maxlongitude: Annotated[float | None, Ge(ge=-180.0), Le(le=180.0)] = None, level: StationLevel = 'station', nodata: NoData = '204', format: StationFormat = 'xml', asquery: bool = False)[source]#

Bases: BaseModel

asquery: Annotated[bool, FieldInfo(annotation=NoneType, required=True, description='Return the database query instead of normal output.')]#
channel: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, description='Select one or more channel codes. Multiple codes are comma-separated.', examples='BH1')]#
endtime: Annotated[datetime | date | None, FieldInfo(annotation=NoneType, required=True, description='Limit results to metadata operating on or before the specified end time, using ISO8601 format YYYY-MM-DDThh:mm:ss[.ssssss]', examples='2012-11-03')]#
format: Annotated[StationFormat, FieldInfo(annotation=NoneType, required=True, description='Specify the result format: xml (StationXML), text (FDSN station text), css (CSS Site rows), or sql (the generated SQL query).')]#
level: Annotated[StationLevel, FieldInfo(annotation=NoneType, required=True, description='Specify the level of detail for the results.')]#
location: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, description='Select one or more location identifiers. This FDSN parameter is accepted for compatibility but is currently not applied.', examples='00')]#
maxlatitude: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, description='Limit to stations with latitude less than or equal to this value.', examples=46.9, metadata=[Ge(ge=-90.0), Le(le=90.0)])]#
maxlongitude: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, description='Limit to stations with longitude less than or equal to this value.', examples=5.3, metadata=[Ge(ge=-180.0), Le(le=180.0)])]#
minlatitude: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, description='Limit to stations with latitude greater than or equal to this value.', examples=40.1, metadata=[Ge(ge=-90.0), Le(le=90.0)])]#
minlongitude: Annotated[float | None, FieldInfo(annotation=NoneType, required=True, description='Limit to stations with longitude greater than or equal to this value.', examples=-10.5, metadata=[Ge(ge=-180.0), Le(le=180.0)])]#
model_config: ClassVar[ConfigDict] = {'extra': 'ignore'}#

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

network: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, description='Select one or more network codes. Multiple codes are comma-separated.', examples='IU')]#
nodata: Annotated[NoData, FieldInfo(annotation=NoneType, required=True, description='Select status code for no data, either 204 (default) or 404.')]#
starttime: Annotated[datetime | date | None, FieldInfo(annotation=NoneType, required=True, description='Limit results to metadata operating on or after the specified start time, using ISO8601 format YYYY-MM-DDThh:mm:ss[.ssssss]', examples='2012-11-01T00:00:00.000')]#
station: Annotated[str | None, FieldInfo(annotation=NoneType, required=True, description='Select one or more station codes. Multiple codes are comma-separated.', examples='ANMO')]#