Skip to content

Client

Client

A client for our data on source.coop.

__init__(config=None)

Initializes the client with HTTP and S3 stores.

Parameters:

Name Type Description Default
config Config | None

Optional configuration. Uses default Config if not provided.

None

get_borehole_data_urls()

Builds a mapping of borehole data URLs by variable and name.

Lists CSV files in the borehole data prefix and organizes them into a nested dict keyed by variable (e.g. "temp", "imp") then borehole name.

Returns:

Type Description
defaultdict[str, dict[str, str]]

A defaultdict mapping variable names to dicts of

defaultdict[str, dict[str, str]]

{borehole_name: url}.

get_borehole_locations_text()

Fetches the borehole locations CSV as text.

Returns:

Type Description
str

The raw CSV content as a UTF-8 string.