class documentation

Low-level HTTP client for the DataGraphs REST API.

Handles authentication, pagination, and batched writes. Every read either returns complete results or raises: a failed request raises HttpStatusError (or DatagraphsError for a transport failure such as a timeout), and a paged read whose pages do not add up raises IncompleteReadError. An empty list always means there was nothing to read.

Method __init__ Initialise the DataGraphs client.
Method apply_datasets Create or update datasets so they match the supplied list.
Method apply_schema Apply a schema to the project, replacing the currently active domain model.
Method clear_class_from_dataset Delete all data of a specific class from a dataset, keeping the dataset itself intact.
Method clear_dataset Delete all data from a dataset, keeping the dataset itself intact.
Method create_dataset Create a new dataset.
Method delete Delete a single entity by class and ID.
Method drop_class_from_dataset Remove the specified class from a dataset, deleting all data of that class.
Method drop_dataset Drop a dataset and all its data entirely.
Method get Retrieve all entities of a given type.
Method get_dataset Retrieve a specific dataset by slug.
Method get_datasets Retrieve all datasets in the project.
Method get_schema Retrieve the active schema for the project.
Method get_schema_update_dependencies Get the schema update dependencies for a new schema.
Method put Load entities into a dataset.
Method query Query the API with filters, facets, sorting, and pagination.
Method query_all Read every result of a search, paging to the end.
Method query_page Fetch one page of search results, with the total and the tokens for paging on.
Method set_wait_time Set the wait time between paginated requests.
Method status Check the API service status.
Method tear_down Remove all datasets and their data from the project.
Method update_dataset Update an existing dataset.
Constant DEFAULT_BATCH_SIZE Undocumented
Constant DEFAULT_MAX_READ_RETRIES Undocumented
Constant DEFAULT_TIMEOUT_S Undocumented
Constant DEFAULT_WAIT_TIME_MS Undocumented
Instance Variable project_name Undocumented
Property wait_time_ms The current wait time in milliseconds between paginated requests.
Class Method _build_query Build a query string from key-value pairs, URL-encoding each value.
Static Method _bisection_cost The requests bisection makes to isolate rejected entities spread evenly through a rejected batch of size.
Static Method _extract_errors Return the error details from a failure response body, falling back to its text.
Static Method _log_put_result Undocumented
Static Method _parse_search_page Parse a search response body, rejecting one that is not a search page.
Static Method _retry_after_s The delay in seconds from a response's Retry-After header, if it gives one in seconds.
Method _assert_datasets_applied Poll the API until the applied datasets match datasets or timeout_s elapses.
Method _cache_buster Return a cache-busting timestamp value.
Method _datasets_match Check if two lists of datasets match by slug and content.
Method _get_auth_token Undocumented
Method _get_headers Undocumented
Method _get_query_url Undocumented
Method _has_oauth_credentials Undocumented
Method _identify_schema_update_dependencies Identify classes that need to be cleared or dropped based on the new schema.
Method _is_timeout Whether error means a request was sent but no response arrived in time.
Method _is_transient Whether error is a failure that retrying the same read could cure.
Method _isolate Find the rejected entities of a rejected group, accounting for every entity in ledger.
Method _isolation_slack The requests beyond one per entity that isolating a rejected batch of size may spend.
Method _poll_interval Select the poll interval for a given elapsed time, per _POLL_SCHEDULE.
Method _put_batch PUT one batch and classify the outcome, returning it with the error (if any).
Method _put_batches Send entities in batches, accounting for each in ledger.
Method _query_gql Undocumented
Method _read_all_pages Read every page of a search, returning all results or raising.
Method _read_json Execute a request and return its JSON body, raising on any failure.
Method _read_search_page GET one page of search results.
Method _remove_schema_update_dependencies Undocumented
Method _request Execute an HTTP request with automatic auth retry, raising on any failure.
Method _resolve_schema_update_dependencies Resolve schema update dependencies by clearing or dropping classes as needed. :param dependencies: The list of schema update dependencies.
Method _retry_delay_s The delay before retry number attempt, honouring any Retry-After the API sent.
Method _sanitise_text Undocumented
Method _send Execute a request whose response body is not needed, raising on any failure.
Constant _ALL_TYPES_FILTER Undocumented
Constant _AUTH_REJECTED Undocumented
Constant _AUTH_URL_SUFFIX Undocumented
Constant _DATA_EXISTS Undocumented
Constant _DATASETS_TIMEOUT_S Undocumented
Constant _DEFAULT_DATASETS_PAGE_SIZE Undocumented
Constant _DEFAULT_FACET_SIZE Undocumented
Constant _HTTP_BAD_REQUEST Undocumented
Constant _HTTP_CLIENT_ERRORS Undocumented
Constant _HTTP_FORBIDDEN Undocumented
Constant _HTTP_GATEWAY_TIMEOUT Undocumented
Constant _HTTP_SUCCESS Undocumented
Constant _HTTP_UNAUTHORIZED Undocumented
Constant _IN_USE_BY_DATASET Undocumented
Constant _MAX_AUTH_RETRIES Undocumented
Constant _NON_PAYLOAD_CLIENT_ERRORS Undocumented
Constant _POLL_SCHEDULE Undocumented
Constant _POLL_SLOW_INTERVAL_S Undocumented
Constant _PROD_URL Undocumented
Constant _QUERY_SAFE_CHARS Undocumented
Constant _RETRY_BASE_DELAY_S Undocumented
Constant _RETRY_MAX_DELAY_S Undocumented
Constant _RETRYABLE_READ_STATUSES Undocumented
Constant _TRANSIENT_TRANSPORT_ERRORS Undocumented
Instance Variable _api_key Undocumented
Instance Variable _auth_token Undocumented
Instance Variable _batch_size Undocumented
Instance Variable _client_id Undocumented
Instance Variable _client_secret Undocumented
Instance Variable _http_client Undocumented
Instance Variable _max_read_retries Undocumented
Instance Variable _service_url Undocumented
Instance Variable _timeout Undocumented
Instance Variable _wait_time_ms Undocumented
Property _base_url Undocumented
def __init__(self, project_name: str, api_key: str, client_id: str = '', client_secret: str = '', batch_size: int = DEFAULT_BATCH_SIZE, service_url: str = _PROD_URL, timeout: float | tuple[float, float] = DEFAULT_TIMEOUT_S, max_read_retries: int = DEFAULT_MAX_READ_RETRIES):

Initialise the DataGraphs client.

Parameters
project_name:strName of the project.
api_key:strAPI key for authentication.
client_id:strOAuth client ID (required for write operations).
client_secret:strOAuth client secret (required for write operations).
batch_size:intNumber of items to process in each batch.
service_url:strBase URL for the API service.
timeout:float | tuple[float, float]Seconds to wait for every request, including the auth token request: either one value for both connecting and reading, or a (connect, read) pair. A request that exceeds it raises.
max_read_retries:intHow many times a GET request is retried after a transient failure (HTTP 429, 502, 503 or 504, a connection error or a timeout) before the failure is raised. 0 disables retries. Writes and GQL queries are never retried.
def apply_datasets(self, datasets: list[Dataset], timeout_s: float = _DATASETS_TIMEOUT_S):

Create or update datasets so they match the supplied list.

New datasets are created; existing datasets with changes are updated. Waits for confirmation that all datasets have been applied.

Parameters
datasets:list[Dataset]Datasets to apply.
timeout_s:floatMaximum time in seconds to wait for the API to confirm all datasets are applied.
Raises
DatagraphsErrorIf datasets are not applied within the timeout.
def apply_schema(self, schema: DatagraphsSchema, mode: SCHEMA_APPLY_MODE = SCHEMA_APPLY_MODE.APPLY) -> None | list[dict[str, Any]]:

Apply a schema to the project, replacing the currently active domain model.

Parameters
schema:DatagraphsSchemaThe schema to apply.
mode:SCHEMA_APPLY_MODEAPPLY to apply it, VALIDATE_ONLY to report what would block it without applying it, or FORCE to clear and drop whatever blocks it and then apply it.
Returns
None | list[dict[str, Any]]For VALIDATE_ONLY, the blocking dependencies the API reported (empty if none); otherwise None.
Raises
ValueErrorIf mode is not a SCHEMA_APPLY_MODE value.
DatagraphsErrorIf the API rejects the schema (and, for FORCE, its dependencies cannot be resolved).
HttpStatusErrorIf the request fails for any reason other than the schema being rejected, e.g. a 504.
def clear_class_from_dataset(self, dataset_slug: str, class_name: str):

Delete all data of a specific class from a dataset, keeping the dataset itself intact.

Parameters
dataset_slug:strThe slug of the dataset to clear.
class_name:strThe name of the class to clear from the dataset.
def clear_dataset(self, dataset_slug: str):

Delete all data from a dataset, keeping the dataset itself intact.

Parameters
dataset_slug:strThe slug of the dataset to clear.
def create_dataset(self, dataset: Dataset):

Create a new dataset.

Parameters
dataset:DatasetThe dataset to create.
def delete(self, class_name: str, entity_id: str):

Delete a single entity by class and ID.

Parameters
class_name:strThe entity class.
entity_id:strThe entity identifier.
Raises
HttpStatusErrorIf the API does not confirm the delete.
def drop_class_from_dataset(self, dataset_slug: str, class_name: str):

Remove the specified class from a dataset, deleting all data of that class.

Parameters
dataset_slug:strThe slug of the dataset to update.
class_name:strThe name of the class to drop from the dataset.
def drop_dataset(self, dataset_slug: str):

Drop a dataset and all its data entirely.

Parameters
dataset_slug:strThe slug of the dataset to drop.
def get(self, class_name: str, lang: str = 'all', include_date_fields: bool = False) -> list[dict[str, Any]]:

Retrieve all entities of a given type.

Pages through every result, and returns them only once all have been read (see query_all).

Parameters
class_name:strThe entity class to fetch.
lang:strLanguage code for results (default 'all').
include_date_fields:boolWhether to include system date metadata.
Returns
list[dict[str, Any]]A list of every entity of the class.
Raises
HttpStatusErrorIf any page request fails.
IncompleteReadErrorIf the pages do not add up to the reported total.
DatagraphsErrorIf the read fails for any other reason.
def get_dataset(self, dataset_slug: str) -> Dataset | None:

Retrieve a specific dataset by slug.

Parameters
dataset_slug:strThe slug of the dataset to retrieve.
Returns
Dataset | NoneA Dataset object if found, otherwise None.
def get_datasets(self) -> list[Dataset]:

Retrieve all datasets in the project.

Returns
list[Dataset]A Dataset for every dataset in the project.
Raises
HttpStatusErrorIf any page request fails.
IncompleteReadErrorIf the pages do not add up to the reported total.
def get_schema(self) -> DatagraphsSchema:

Retrieve the active schema for the project.

Returns
DatagraphsSchemaThe current project Schema.
def get_schema_update_dependencies(self, schema: DatagraphsSchema) -> tuple[set[tuple[str, str]], set[tuple[str, str]]]:

Get the schema update dependencies for a new schema.

Parameters
schema:DatagraphsSchemaThe new schema to check.
Returns
tuple[set[tuple[str, str]], set[tuple[str, str]]]A tuple containing two sets: - Classes to clear (set of (class_name, dataset_slug)) - Classes to drop (set of (class_name, dataset_slug))
def put(self, dataset: str, data: dict[str, Any] | list[dict[str, Any]], isolation: ISOLATION_MODE = ISOLATION_MODE.BISECT) -> PutResult:

Load entities into a dataset.

Entities are sent in batches of the configured batch_size, and every batch is attempted regardless of the outcome of earlier ones. A batch whose payload is rejected (a 4xx response other than 404, 405, 408 or 429, or a value that cannot be JSON-encoded) is resubmitted as isolation directs, so that only the offending entities fail. A batch that fails for reasons unrelated to its payload (those 4xx statuses, a 5xx response or a transport error) is not resubmitted, and all of its entities are reported as failed. A batch that times out (504 or a read timeout) is reported as timed out, since its write may still have completed. All of this applies equally to each part of a batch that is resubmitted.

DataGraphs writes no part of a batch it rejects, so resubmitting parts of one cannot write an entity twice, even one without an id. An entity is reported as rejected only once it has been rejected on its own, so each rejection carries that entity's own status and errors.

Parameters
dataset:strTarget dataset slug.
data:dict[str, Any] | list[dict[str, Any]]A single entity dict or a list of entity dicts.
isolation:ISOLATION_MODEHow to find the rejected entities of a rejected batch. BISECT (the default) splits it in halves until they are isolated, switching to one entity at a time when most are rejected; INDIVIDUAL resubmits each entity on its own; NONE reports the whole batch as failed without resubmitting it.
Returns
PutResultThe outcome for every submitted entity.
Raises
ValueErrorIf isolation is not an ISOLATION_MODE value.
AuthenticationErrorIf authentication fails; no further batches are attempted. Its result accounts for every entity, with those not written in unsent.
TokenRequestErrorIf an auth token cannot be obtained; no further batches are attempted. Its result accounts for every entity, with those not written in unsent.
def query(self, gql: str = '', dataset: str = '_all', q: str = '', filters: str = '', facets: str = '', facet_size: int = -1, date_facets: str = '', fields: str = '', embed: str = '', sort: str = '', ids: str = '', lang: str = 'all', page_no: int = -1, page_size: int = -1, previous_page_token: str = '', next_page_token: str = '', include_date_fields: bool = False) -> list[dict[str, Any]] | tuple[list[dict[str, Any]], list[dict[str, Any]]]:

Query the API with filters, facets, sorting, and pagination.

Returns a single page of results. Use query_page to also get the total and the page tokens, or query_all to read every page.

Parameters
gql:stra GQL query string - if this is specified then all other arguments except lang are ignored, and the rows the query returns are returned as a list.
dataset:strDataset slug to query (default '_all').
q:strFree-text search query string.
filters:strFilter expression (e.g. 'type:Person').
facets:strComma-separated facet field names.
facet_size:intNumber of facet values to return (default 10).
date_facets:strDate facet specification.
fields:strComma-separated field names to include in results.
embed:strEmbedding depth for related entities.
sort:strSort expression (e.g. 'label:asc').
ids:strComma-separated entity IDs to fetch directly.
lang:strLanguage code for results (default 'all').
page_no:intPage number for offset-based pagination.
page_size:intNumber of results per page.
previous_page_token:strToken for cursor-based backward pagination.
next_page_token:strToken for cursor-based forward pagination.
include_date_fields:boolWhether to include system date metadata.
Returns
list[dict[str, Any]] | tuple[list[dict[str, Any]], list[dict[str, Any]]]A list of result dicts, or a (results, facets) tuple when the response carries facets.
Raises
HttpStatusErrorIf the request fails.
DatagraphsErrorIf the request fails for any other reason, or the response is malformed.
def query_all(self, dataset: str = '_all', q: str = '', filters: str = '', fields: str = '', embed: str = '', sort: str = '', lang: str = 'all', page_size: int = -1, include_date_fields: bool = False) -> list[dict[str, Any]]:

Read every result of a search, paging to the end.

Results are returned only once all have been read, so a partial result is never returned: every page must succeed, and the results must add up to the totalResults the API reported, with no result repeated. Pages are fetched by nextPageToken whenever the API provides one, since page numbers cannot reach past the first 10,000 results.

Parameters
dataset:strDataset slug to query (default '_all').
q:strFree-text search query string.
filters:strFilter expression (e.g. 'type:Person').
fields:strComma-separated field names to include in results.
embed:strEmbedding depth for related entities.
sort:strSort expression (e.g. 'label:asc').
lang:strLanguage code for results (default 'all').
page_size:intNumber of results per page request (default: the client's batch_size).
include_date_fields:boolWhether to include system date metadata.
Returns
list[dict[str, Any]]Every result, in the order the API returned them.
Raises
HttpStatusErrorIf any page request fails.
IncompleteReadErrorIf the pages do not add up to the reported total.
DatagraphsErrorIf the read fails for any other reason, or a response is malformed.
def query_page(self, dataset: str = '_all', q: str = '', filters: str = '', facets: str = '', facet_size: int = -1, date_facets: str = '', fields: str = '', embed: str = '', sort: str = '', lang: str = 'all', page_no: int = -1, page_size: int = -1, previous_page_token: str = '', next_page_token: str = '', include_date_fields: bool = False) -> QueryPage:

Fetch one page of search results, with the total and the tokens for paging on.

Takes the same arguments as query, except gql and ids. page_size defaults to the client's batch_size.

Returns
QueryPageThe page.
Raises
HttpStatusErrorIf the request fails.
DatagraphsErrorIf the request fails for any other reason, or the response is malformed.
def set_wait_time(self, wait_time_ms: int):

Set the wait time between paginated requests.

Parameters
wait_time_ms:intWait time in milliseconds.
def status(self) -> str:

Check the API service status.

Returns
strThe API status string, or 'unknown' if unavailable.
Raises
AuthenticationErrorIf authentication fails.
def tear_down(self, drop_datasets: bool = True):

Remove all datasets and their data from the project.

Parameters
drop_datasets:boolIf True, drops each dataset entirely. If False, only clears the data from each dataset.
def update_dataset(self, dataset: Dataset):

Update an existing dataset.

Parameters
dataset:DatasetThe dataset to update (matched by slug).
DEFAULT_BATCH_SIZE: int =

Undocumented

Value
100
DEFAULT_MAX_READ_RETRIES: int =

Undocumented

Value
3
DEFAULT_TIMEOUT_S: tuple[float, ...] =

Undocumented

Value
(10.0, 60.0)
DEFAULT_WAIT_TIME_MS: int =

Undocumented

Value
200
project_name =

Undocumented

@property
wait_time_ms: int =

The current wait time in milliseconds between paginated requests.

@classmethod
def _build_query(cls, params: list[tuple[str, Any]]) -> str:

Build a query string from key-value pairs, URL-encoding each value.

Every character that could change how the query string is read (&, =, #, +, %, spaces, non-ASCII...) is encoded, so each value reaches the API exactly as given.

@staticmethod
@functools.cache
def _bisection_cost(size: int, rejected: int) -> int:

The requests bisection makes to isolate rejected entities spread evenly through a rejected batch of size.

@staticmethod
def _extract_errors(response: requests.Response) -> list[Any]:

Return the error details from a failure response body, falling back to its text.

@staticmethod
def _log_put_result(result: PutResult, length: int, dataset: str):

Undocumented

@staticmethod
def _parse_search_page(body: Any, url: str) -> QueryPage:

Parse a search response body, rejecting one that is not a search page.

@staticmethod
def _retry_after_s(response: requests.Response) -> float | None:

The delay in seconds from a response's Retry-After header, if it gives one in seconds.

def _assert_datasets_applied(self, datasets: list[Dataset], timeout_s: float):

Poll the API until the applied datasets match datasets or timeout_s elapses.

Polling backs off on the schedule described by _POLL_SCHEDULE: every 1s for the first 10s, every 2s for the next 20s, then every 5s.

Parameters
datasets:list[Dataset]The datasets expected to be applied.
timeout_s:floatMaximum time in seconds to wait for confirmation.
Raises
DatagraphsErrorIf the datasets are not applied within the timeout.
def _cache_buster(self) -> str:

Return a cache-busting timestamp value.

def _datasets_match(self, datasets_a: list[Dataset], datasets_b: list[Dataset]) -> bool:

Check if two lists of datasets match by slug and content.

Parameters
datasets_a:list[Dataset]First list of datasets.
datasets_b:list[Dataset]Second list of datasets.
Returns
boolTrue if the lists match, otherwise False.
def _get_auth_token(self, force_refresh=False) -> str:

Undocumented

def _get_headers(self, lang: str = 'all') -> dict[str, str]:

Undocumented

def _get_query_url(self, dataset: str = '_all', q: str = '', filters: str = '', facets: str = '', facet_size: int = -1, date_facets: str = '', fields: str = '', embed: str = '', sort: str = '', ids: str = '', lang: str = 'all', page_no: int = -1, page_size: int = -1, previous_page_token: str = '', next_page_token: str = '', include_date_fields: bool = False) -> str:

Undocumented

def _has_oauth_credentials(self) -> bool:

Undocumented

def _identify_schema_update_dependencies(self, dependencies: list[dict]) -> tuple[set[tuple[str, str]], set[tuple[str, str]]]:

Identify classes that need to be cleared or dropped based on the new schema.

Parameters
dependencies:list[dict]The list of schema update dependencies.
Returns
tuple[set[tuple[str, str]], set[tuple[str, str]]]A tuple containing two sets: - Classes to clear (set of (class_name, dataset_slug)) - Classes to drop (set of (class_name, dataset_slug))
def _is_timeout(self, error: Exception) -> bool:

Whether error means a request was sent but no response arrived in time.

The API's 504 and a client read timeout both mean the request may still have completed server-side. A connect timeout does not: the request was never sent.

def _is_transient(self, error: DatagraphsError) -> bool:

Whether error is a failure that retrying the same read could cure.

def _isolate(self, url: str, group: list[dict[str, Any]], start: int, ledger: _PutLedger, budget: _IsolationBudget):

Find the rejected entities of a rejected group, accounting for every entity in ledger.

The group is split in halves while budget allows, and otherwise resubmitted one entity at a time. start is the position of its first entity in the data passed to put.

def _isolation_slack(self, isolation: ISOLATION_MODE, size: int, tally: _RejectionTally) -> int:

The requests beyond one per entity that isolating a rejected batch of size may spend.

Resubmitting one entity at a time costs size requests. Bisecting costs about 2·log₂(size) per rejected entity: far less when few are rejected, but up to twice as much when all are. Bisection is therefore allowed the cost of isolating one entity beyond size, and none at all when the rejections so far suggest it would cost more than size.

def _poll_interval(self, elapsed_s: float) -> float:

Select the poll interval for a given elapsed time, per _POLL_SCHEDULE.

Parameters
elapsed_s:floatSeconds elapsed since polling began.
Returns
floatThe interval in seconds to wait before the next check.
def _put_batch(self, url: str, batch: list[dict[str, Any]]) -> tuple[_BatchOutcome, Exception | None]:

PUT one batch and classify the outcome, returning it with the error (if any).

def _put_batches(self, url: str, dataset: str, entities: list[dict[str, Any]], isolation: ISOLATION_MODE, ledger: _PutLedger):

Send entities in batches, accounting for each in ledger.

def _query_gql(self, gql: str, lang: str) -> list[dict[str, Any]]:

Undocumented

def _read_all_pages(self, page_url: Callable[[str, int], str], lang: str = 'all') -> list[dict[str, Any]]:

Read every page of a search, returning all results or raising.

Parameters
page_url:Callable[[str, int], str]Builds the URL of a page from a nextPageToken ('' when there is none) and a page number.
lang:strUndocumented
Returns
list[dict[str, Any]]Undocumented
def _read_json(self, method: HTTP, url: str, retries: int | None = None, **kwargs) -> Any:

Execute a request and return its JSON body, raising on any failure.

A GET is idempotent, so one that fails transiently is retried, with backoff, before the failure is raised.

Parameters
method:HTTPUndocumented
url:strUndocumented
retries:int | NoneHow many times to retry a transient failure: by default max_read_retries for a GET, and none otherwise.
**kwargsUndocumented
Returns
AnyUndocumented
Raises
DatagraphsErrorIf the request fails, or a successful response has an empty or unparseable body.
def _read_search_page(self, url: str, lang: str = 'all') -> QueryPage:

GET one page of search results.

def _remove_schema_update_dependencies(self, classes_to_clear: set[tuple[str, str]], classes_to_drop: set[tuple[str, str]]):

Undocumented

def _request(self, method: HTTP, url: str, lang: str = 'all', _retry_count: int = 0, **kwargs) -> requests.Response:

Execute an HTTP request with automatic auth retry, raising on any failure.

The headers, including any auth token, are built afresh for every attempt, so a token obtained or refreshed for one attempt is used by it.

Parameters
method:HTTPThe HTTP method to use.
url:strThe request URL.
lang:strThe language to request results in.
_retry_count:intInternal retry counter (do not set externally).
**kwargsAdditional arguments forwarded to the HTTP client.
Returns
requests.ResponseThe response, which always has a 2xx status.
Raises
AuthenticationErrorIf authentication fails after max retries.
TokenRequestErrorIf an auth token cannot be obtained; the request itself was then never sent.
HttpStatusErrorIf the API responds with any other non-2xx status.
DatagraphsErrorIf the request fails for any other reason, with the underlying requests exception (e.g. a ReadTimeout) as its __cause__.
def _resolve_schema_update_dependencies(self, dependencies: list[dict]):

Resolve schema update dependencies by clearing or dropping classes as needed. :param dependencies: The list of schema update dependencies.

def _retry_delay_s(self, attempt: int, error: DatagraphsError) -> float:

The delay before retry number attempt, honouring any Retry-After the API sent.

def _sanitise_text(self, value: str) -> str:

Undocumented

def _send(self, method: HTTP, url: str, **kwargs):

Execute a request whose response body is not needed, raising on any failure.

_ALL_TYPES_FILTER: str =

Undocumented

Value
'_all'
_AUTH_REJECTED =

Undocumented

Value
frozenset(set([400, 401, 403]))
_AUTH_URL_SUFFIX: str =

Undocumented

Value
'oauth/token'
_DATA_EXISTS: str =

Undocumented

Value
'DATA_EXISTS'
_DATASETS_TIMEOUT_S: int =

Undocumented

Value
300
_DEFAULT_DATASETS_PAGE_SIZE: int =

Undocumented

Value
1000
_DEFAULT_FACET_SIZE: int =

Undocumented

Value
10
_HTTP_BAD_REQUEST: int =

Undocumented

Value
400
_HTTP_CLIENT_ERRORS =

Undocumented

Value
range(400, 500)
_HTTP_FORBIDDEN: int =

Undocumented

Value
403
_HTTP_GATEWAY_TIMEOUT: int =

Undocumented

Value
504
_HTTP_SUCCESS =

Undocumented

Value
range(200, 300)
_HTTP_UNAUTHORIZED: int =

Undocumented

Value
401
_IN_USE_BY_DATASET: str =

Undocumented

Value
'IN_USE_BY_DATASET'
_MAX_AUTH_RETRIES: int =

Undocumented

Value
2
_NON_PAYLOAD_CLIENT_ERRORS =

Undocumented

Value
frozenset(set([404, 405, 408, 429]))
_POLL_SCHEDULE: tuple =

Undocumented

Value
((10, 1), (30, 2))
_POLL_SLOW_INTERVAL_S: int =

Undocumented

Value
5
_PROD_URL: str =

Undocumented

Value
'https://api.datagraphs.io/'
_QUERY_SAFE_CHARS: str =

Undocumented

Value
':,'
_RETRY_BASE_DELAY_S: float =

Undocumented

Value
1.0
_RETRY_MAX_DELAY_S: float =

Undocumented

Value
30.0
_RETRYABLE_READ_STATUSES =

Undocumented

Value
frozenset(set([429, 502, 503, 504]))
_TRANSIENT_TRANSPORT_ERRORS =

Undocumented

Value
(requests.exceptions.ConnectionError,
 requests.exceptions.Timeout,
 requests.exceptions.ChunkedEncodingError)
_api_key =

Undocumented

_auth_token =

Undocumented

_batch_size =

Undocumented

_client_id =

Undocumented

_client_secret =

Undocumented

_http_client =

Undocumented

_max_read_retries =

Undocumented

_service_url =

Undocumented

_timeout =

Undocumented

_wait_time_ms =

Undocumented

@property
_base_url: str =

Undocumented