Ingest¶
-
exception
citrination_client.data.ingest.ingester.
ArgumentNotFoundError
(message)¶ -
__init__
(message)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
citrination_client.data.ingest.ingester.
Ingester
(ingester)¶ Class representation of an ingester
- Variables
display_name (str) –
description (str) –
namespace (str) –
name (str) –
version (str) –
id (str) –
arguments (list of dict) – any optional and/or required arguments for the ingester
-
SEARCH_FIELDS
= {'description', 'display_name', 'id', 'name', 'namespace', 'version'}¶ Attributes of an Ingester that can be searched when filtering through Ingesters via the IngestList#where method.
-
__init__
(ingester)¶ Constructor.
- Parameters
ingester (dict) – An ingester
-
as_json
()¶ Returns a dict that can used for ingest submission
- Returns
A dict representation of the ingester
- Return type
dict
-
clone
()¶ Returns a copy of the ingester. Used by the IngestClient to apply values to a copy of the selected ingester before submission.
- Returns
Returns a copy of the ingester based on a deep clone of the _ingester dict that instantiated the instance.
- Returns
class:Ingester
-
find_argument
(name)¶ Finds an argument in self.arguments that matches the provided name. If there are no matches, raises an ArgumentNotFoundError
- Parameters
name (str) – The name of the argument
- Returns
The argument whose name matched
- Return type
dict
-
classmethod
validate_search_key
(key, suppress_error=True)¶ Returns whether or not a key correlates to a field that can be searched
- Parameters
key (str) – The key to check
suppress_error (bool) – When false, will raise an error for invalid keys
- Returns
True if the key is valid, otherwise false
- Return type
bool
-
class
citrination_client.data.ingest.ingester_list.
IngesterList
(ingesters)¶ Class representation of a list of ingesters available for data upload on Citrination.
- Variables
ingesters (list of
Ingester
) –
-
__init__
(ingesters)¶ Constructor.
- Parameters
ingesters (Union[list,
IngesterList
]) – A list of ingesters
-
find_by_id
(id)¶ Finds the ingester whose id matches the provided id
- Parameters
id (str) – The id of the desired ingester
- Returns
An ingester
- Return type
Ingester
-
ingester_count
¶ Returns the count of how many Ingesters are in the list
- Returns
number of Ingesters in the list
- Return type
int
-
where
(options)¶ Finds ingesters that match the search criteria
- Parameters
options (dict) – contains string:string key value pairs, allowed keys are those found in the Ingester.SEARCH_FIELDS constant
- Returns
A list of matching ingesters
- Return type