earthkit_data_meteoswiss_opendata.api#

MeteoSwiss Open Data STAC API helpers.

Copyright (c) 2026 MeteoSwiss, contributors listed in AUTHORS

Distributed under the terms of the BSD 3-Clause License.

SPDX-License-Identifier: BSD-3-Clause

Attributes#

Functions#

get_asset_urls(→ list[str])

Return assets matching a MeteoSwiss request.

get_collection_asset_url(→ str)

Return the URL of a collection-level static asset.

Module Contents#

API_URL = 'https://data.geo.admin.ch/api/stac/v1'#
TIMEOUT = 30#
session[source]#
get_asset_urls(request: earthkit_data_meteoswiss_opendata.request.Request) → list[str][source]#

Return assets matching a MeteoSwiss request.

For requests with several lead times, only complete forecast runs are returned.

get_collection_asset_url(collection_id: str, asset_id: str) → str[source]#

Return the URL of a collection-level static asset.

Parameters:
  • collection_id – Fully qualified STAC collection ID.

  • asset_id – Identifier of the collection asset.

Returns:

URL of the requested collection asset.

Raises:
  • requests.HTTPError – If the collection-assets request fails.

  • KeyError – If the requested asset is not present.