Bases: object
Main entry point for the ROAK SDK.
It is a facade pattern.
Handles authentication and provides methods for a user to get lists of his assets
Users must provide explicit credentials (user + password). Provides convenience methods
to fetch Projects, Wells, Rigs, and Boreholes as objects.
- Parameters:
request_timeout (int | float | None)
-
refresh_tokens()[source]
Manually refresh the authentication tokens and update headers in all clients.
- Returns:
New headers if refresh succeeded.
- Return type:
dict[str, str] | None
-
set_request_timeout(request_timeout)[source]
Update the timeout used for auth and future client requests.
Use None or a negative value to disable request timeouts.
- Parameters:
request_timeout (int | float | None)
- Return type:
float | None
-
get_asset_types()[source]
Fetch all asset types from the ROAK API.
- Returns:
List of asset type dictionaries.
- Return type:
list[dict]
-
get_customers()[source]
Fetch all customers from the ROAK API.
- Returns:
List of Customer objects.
- Return type:
list[Customer]
-
get_customer_by_name(name, allow_first_match=False)[source]
Fetch a customer by its name.
- Parameters:
name (str) – Name of the customer.
allow_first_match (bool) – If True, return the first match when
multiple customers share the same name.
- Returns:
Customer object matching the given name.
- Return type:
Customer
-
get_customer_by_guid(guid)[source]
Fetch a customer by its GUID.
- Parameters:
guid (str) – GUID of the customer.
- Returns:
Customer object matching the given GUID.
- Return type:
Customer
-
get_asset_by_guid(guid)[source]
Fetch an asset by its GUID and materialize the best semantic type.
- Parameters:
guid (str)
-
get_asset_by_name(name, asset_type=None, allow_first_match=False)[source]
Fetch an asset by name and materialize the best semantic type.
- Parameters:
name (str)
asset_type (str | None)
allow_first_match (bool)
-
get_wells()[source]
Fetch all wells from the ROAK API.
- Return type:
list[Well]
-
get_boreholes()[source]
Fetch all boreholes from the ROAK API.
- Return type:
list[Borehole]
-
get_project_by_name(name, allow_first_match=False)[source]
Fetch a project by its name.
- Parameters:
name (str) – Name of the project.
allow_first_match (bool) – If True, return the first match when
multiple projects share the same name.
- Returns:
Project object matching the given name.
- Return type:
Project
-
get_project_by_guid(guid)[source]
Fetch a project by its GUID.
- Parameters:
guid (str) – GUID of the project.
- Returns:
Project object matching the given GUID.
- Return type:
Project
-
get_projects()[source]
Fetch all projects from ProjectClient.
Returns a list of Project objects.
- Return type:
list[Project]
-
get_sites()[source]
Fetch all sites from the ROAK API.
- Returns:
List of Site objects.
- Return type:
list[“Site”]
-
get_site_by_name(name, allow_first_match=False)[source]
Fetch a site by its name.
- Parameters:
name (str) – Name of the site.
allow_first_match (bool) – If True, return the first match when
multiple sites share the same name.
- Returns:
Site object matching the given name.
- Return type:
Site
-
get_site_by_guid(guid)[source]
Fetch a site by its GUID.
- Parameters:
guid (str) – GUID of the site.
- Returns:
Site object matching the given GUID.
- Return type:
Site
-
get_borehole_by_guid(guid)[source]
Fetch a borehole by its GUID.
- Parameters:
guid (str)
- Return type:
Borehole
-
get_well_by_guid(guid)[source]
Fetch a well by its GUID.
- Parameters:
guid (str)
- Return type:
Well
-
get_well_by_name(name, allow_first_match=False)[source]
Fetch a well by its name.
- Parameters:
name (str)
allow_first_match (bool)
- Return type:
Well
-
get_borehole_by_name(name, allow_first_match=False)[source]
Fetch a borehole by its name.
- Parameters:
name (str)
allow_first_match (bool)
- Return type:
Borehole
-
get_rigs()[source]
Fetch all rigs from the ROAK API.
- Returns:
List of Rig objects.
- Return type:
list[Rig]
-
get_rig_by_name(name, allow_first_match=False)[source]
Fetch a rig by its name.
- Parameters:
name (str) – Name of the rig.
allow_first_match (bool) – If True, return the first match when
multiple assets share the same rig name.
- Returns:
Rig object matching the given name.
- Return type:
Rig
-
get_rig_by_guid(guid)[source]
Fetch a rig by its GUID.
- Parameters:
guid (str) – GUID of the rig.
- Returns:
Rig object matching the given GUID.
- Return type:
Rig
-
get_modems()[source]
Fetch all modems from the ROAK API.
- Returns:
List of Modem objects.
- Return type:
list[“Modem”]
-
get_modem_by_guid(guid)[source]
Fetch a modem by its GUID.
- Parameters:
guid (str) – GUID of the modem.
- Returns:
Modem object matching the given GUID.
- Return type:
Modem
-
get_modem_by_name(name, allow_first_match=False)[source]
Fetch a modem by its name (serial number).
For modems, the name/serial number is the same as the GUID,
so this method delegates to get_modem_by_guid().
- Parameters:
-
- Returns:
Modem object matching the given name.
- Return type:
Modem