kbws.models.dataselect module#

Pydantic request models for the FDSN dataselect service.

class kbws.models.dataselect.DataselectFormat(*values)[source]#

Bases: str, Enum

css = 'css'#
miniseed = 'miniseed'#
sac = 'sac.zip'#
sql = 'sql'#
class kbws.models.dataselect.DataselectQuery(*, starttime: datetime | date, endtime: datetime | date, network: str, station: str, location: str, channel: str, format: DataselectFormat = DataselectFormat.miniseed, nodata: NoData = '204')[source]#

Bases: BaseModel

channel: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Select one or more SEED channel codes. Multiple codes are comma-separated.', examples='BH1')]#
endtime: Annotated[datetime | date, FieldInfo(annotation=NoneType, required=True, description='Limit results to time series samples on or before the specified end time, using ISO8601 format YYYY-MM-DDThh:mm:ss[.ssssss]', examples='2009-06-01T10:30:00.000')]#
format: Annotated[DataselectFormat, FieldInfo(annotation=NoneType, required=True, description='Specify format of result: miniseed (default), text (described in FDSN specification, not yet implemented), css (text Wfdisc table rows), or sql (the SQL query that was built, not the results).')]#
location: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Select one or more SEED location identifiers. Multiple identifiers are comma-separated. As a special case ‘--’ (two dashes) will be translated to a string of two space characters to match blank location IDs.', examples='00')]#
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='Select one or more network codes. Can be SEED network codes or data center defined 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, FieldInfo(annotation=NoneType, required=True, description='Limit results to time series samples on or after the specified start time, using ISO8601 format YYYY-MM-DDThh:mm:ss[.ssssss]', examples='2009-05-01T06:30:00.000')]#
station: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Select one or more SEED station codes. Multiple codes are comma-separated', examples='ANMO')]#