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: 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 usepath="GetAdvancedListsData"
.
-