Gvz API
This module interacts with an external GVZ (Gemeindeverzeichnis) API to automatically import coordinates and region aliases.
Apps
Configuration of GVZ API app
Utils
Helper classes for Gemeindeverzeichnis API
- class integreat_cms.gvz_api.utils.GvzApiWrapper[source]
Bases:
object
Class that wraps around the GVZ (Gemeindeverzeichnis) API
- best_match(region_name: str | None, division_type: str | None) dict[str, Any] | None [source]
Tries to find the correct region id (single search hit)
- Parameters:
region_name (str | None) – name of a region (city name, county name, etc)
division_type (str | None) – administrative division type of region (choices:
administrative_division
)
- Returns:
JSON search results defined in the GVZ API
- Return type:
- get_child_coordinates(child_urls: list) dict [source]
Recursively get coordinates for list of children
- class integreat_cms.gvz_api.utils.GvzRegion(region_ags: str | None = None, region_name: str | None = None, region_type: str | None = None)[source]
Bases:
object
Represents a region in the GVZ, initial values will be retrieved from API on initialization.
- Parameters:
region_ags (str | None) – official ID for a region, i.e. Gemeindeschlüssel, defaults to
None
region_name (str | None) – name of a region (city name, county name, etc), defaults to
None
division_type – administrative division type of region (choices:
administrative_division
), defaults toNone
region_type (str | None)