Docstrings for sa_gwdata package

Submodules

sa_gwdata.waterconnect module

class sa_gwdata.waterconnect.Response(response, **kwargs)[source]

Bases: object

r

Return the HTTP requests.Response object.

json

Convert the response to JSON. Returns a dict/list.

df

If the response is a list, convert to a pandas DataFrame with columns converted into the lowercase.

df_exists

Check if JSON can be converted to a DataFrame. Returns bool.

class sa_gwdata.waterconnect.WaterConnectSession(*args, endpoint=None, sleep=2, verify=True, **kwargs)[source]

Bases: requests.sessions.Session

Wrapper around repeated requests to Groundwater Data.

Parameters:
  • endpoint (str) – url endpoint for API, optional
  • sleep (int) – minimum interval between requests in seconds. Be nice, do not reduce it.
  • verify (bool) – require valid SSL certificate

Other args and kwargs are passed to request.Session constructor.

Usage:

>>> from sa_gwdata import WaterConnectSession
>>> with WaterConnectSession() as s:
...     df = s.get("GetObswellNetworkData", params={"Network": "CENT_ADEL"})
well_id_cols = {'dhno': 'drillhole_no', 'mapnum': 'unit_long', 'obsnumber': 'obs_no'}
get(path, verify=None, **kwargs)[source]

HTTP GET verb to Groundwater Data.

Parameters:path (str) – final portion of URL path off the end of self.endpoint e.g. to GET https://www.waterconnect.sa.gov.au/_layouts/15/dfw.sharepoint.wdd/WDDDMS.ashx/GetAdvancedListsData then you would use path="GetAdvancedListsData".
refresh_available_groupings()[source]

Load lists data from API. Stores them in the attributes networks, nrm_regions, pwas, pwras.

data_pwa(pwa, swl_status=None, tds_status=None)[source]

sa_gwdata.sarig module

sa_gwdata.sarig.collect_sarig_images(self)[source]

Module contents