atomicds.client.Client¶
- class atomicds.client.Client(api_key: str | None = None, endpoint: str = 'https://api.atomicdatasciences.com/', mute_bars: bool = False)[source]¶
Bases:
BaseClient
- Parameters:
api_key (str | None) – API key. Defaults to None which will try and pull from the ADS_API_KEY environment variable.
endpoint (str) – Root API endpoint. Will prioritize pulling from the ADS_API_ENDPOINT environment variable. If none provided it defaults to ‘https://api.atomicdatasciences.com/’.
mute_bars (bool) – Whether to mute progress bars. Defaults to False.
- __init__(api_key: str | None = None, endpoint: str = 'https://api.atomicdatasciences.com/', mute_bars: bool = False)[source]¶
- Parameters:
api_key (str | None) – API key. Defaults to None which will try and pull from the ADS_API_KEY environment variable.
endpoint (str) – Root API endpoint. Will prioritize pulling from the ADS_API_ENDPOINT environment variable. If none provided it defaults to ‘https://api.atomicdatasciences.com/’.
mute_bars (bool) – Whether to mute progress bars. Defaults to False.
Methods
__init__
([api_key, endpoint, mute_bars])get
(data_ids)Get analyzed data results
search
([keywords, ...])Search and obtain data catalogue entries
Attributes
Session under which HTTP requests are issued
- search(keywords: str | list[str] | None = None, include_organization_data: bool = True, data_ids: str | list[str] | None = None, data_type: Literal['rheed_image', 'rheed_stationary', 'rheed_rotating', 'xps', 'all'] = 'all', status: Literal['success', 'pending', 'error', 'running', 'all'] = 'success', growth_length: tuple[int | None, int | None] = (None, None), upload_datetime: tuple[datetime | None, datetime | None] = (None, None), last_accessed_datetime: tuple[datetime | None, datetime | None] = (None, None)) DataFrame [source]¶
Search and obtain data catalogue entries
- Parameters:
keywords (str | list[str] | None) – Keyword or list of keywords to search all data catalogue fields with. This searching is applied after all other explicit filters. Defaults to None.
include_organization_data (bool) – Whether to include catalogue entries from other users in your organization. Defaults to True.
data_ids (str | list[str] | None) – Data ID or list of data IDs. Defaults to None.
data_type (Literal["rheed_image", "rheed_stationary", "rheed_rotating", "xps", "all"]) – Type of data. Defaults to “all”.
status (Literal["success", "pending", "error", "running", "all"]) – Analyzed status of the data. Defaults to “all”.
growth_length (tuple[int | None, int | None]) – Minimum and maximum values of the growth length in seconds. Defaults to (None, None) which will include all non-video data.
upload_datetime (tuple[datetime | None, datetime | None]) – Minimum and maximum values of the upload datetime. Defaults to (None, None).
last_accessed_datetime (tuple[datetime | None, datetime | None]) – Minimum and maximum values of the last accessed datetime. Defaults to (None, None).
- Returns:
Pandas DataFrame containing matched entries in the data catalogue.
- Return type:
(DataFrame)
- get(data_ids: str | list[str]) list[RHEEDVideoResult | RHEEDImageResult | XPSResult] [source]¶
Get analyzed data results
- Parameters:
data_ids (str | list[str]) – Data ID or list of data IDs from the data catalogue to obtain analyzed results for.
- Returns:
List of result objects
- Return type:
(list[RHEEDVideoResult | RHEEDVideoResult | XPSResult])
- property session: Session¶
Session under which HTTP requests are issued