src.geoserver.geoserver_common
Core functions for serving data and working with workspaces in geoserver.
Attributes
Functions
|
Retrieve full GeoServer URL from environment variables. |
|
Create a GeoServer workspace if it does not currently exist. |
|
Check if a GeoServer style definition already exists for a given style_name. |
Module Contents
- src.geoserver.geoserver_common.log
- src.geoserver.geoserver_common._xml_header
- src.geoserver.geoserver_common.get_geoserver_url() str
Retrieve full GeoServer URL from environment variables.
- Returns:
The full GeoServer URL
- Return type:
str
- src.geoserver.geoserver_common.create_workspace_if_not_exists(workspace_name: str) None
Create a GeoServer workspace if it does not currently exist.
- Parameters:
workspace_name (str) – The name of the workspace to create if it does not exists.
- Raises:
HTTPError – If geoserver responds with an error, raises it as an exception since it is unexpected.
- src.geoserver.geoserver_common.style_exists(style_name: str) bool
Check if a GeoServer style definition already exists for a given style_name. The style definition may be empty.
- Parameters:
style_name (str) – The name of the style to check for
- Returns:
True if the style exists, although it may be empty. False if it does not exist.
- Return type:
bool
- Raises:
HTTPError – If geoserver responds with anything but OK or NOT_FOUND, raises it as an exception since it is unexpected.