kbws.routes.station module#

FastAPI routes for querying FDSN station metadata.

kbws.routes.station.get_wadl()[source]#

Return the packaged station-service WADL document.

kbws.routes.station.station_query(request: ~starlette.requests.Request, params: ~typing.Annotated[~kbws.models.station.StationQuery, Query(PydanticUndefined)], session: ~sqlalchemy.orm.session.Session = Depends(dependency=<function get_db>, use_cache=True, scope=None))[source]#

Query station metadata.

Returns StationXML by default, or FDSN station text for network, station, and channel levels. The css format returns Site rows and sql returns the generated SQL query.

### Example

[/fdsnws/station/1/query?channel=BH?&endtime=2010-03-28&format=text&level=channel&network=TA&starttime=2010-03-25&station=A25A](/fdsnws/station/1/query?channel=BH?&endtime=2010-03-28&format=text&level=channel&network=TA&starttime=2010-03-25&station=A25A)

kbws.routes.station.station_query_post(request: ~starlette.requests.Request, body: str = Body(PydanticUndefined), session: ~sqlalchemy.orm.session.Session = Depends(dependency=<function get_db>, use_cache=True, scope=None))[source]#

Query station metadata using the FDSN station POST request format.

The body may contain global key=value parameters followed by repeated NET STA LOC CHA STARTTIME ENDTIME selection rows.

### Example

`text format=text level=channel TA A25A -- BH? 2010-03-25T00:00:00 2010-03-28T00:00:00 `

kbws.routes.station.station_version()[source]#
kbws.routes.station.station_wadl(wadl: str = Depends(dependency=<function get_wadl>, use_cache=True, scope=None))[source]#