roboto.roboto_search#
Module Contents#
- class roboto.roboto_search.RobotoSearch(query_client=None)#
A high-level interface for querying the Roboto data platform.
In most cases, using this class should be as simple as:
>>> from roboto import RobotoSearch >>> rs = RobotoSearch() >>> for dataset in rs.find_datasets(...): ... ...
- Parameters:
query_client (Optional[roboto.query.QueryClient])
- find_collections(query=None, timeout_seconds=math.inf)#
- Parameters:
query (Optional[roboto.query.Query])
timeout_seconds (float)
- Return type:
collections.abc.Generator[roboto.domain.collections.Collection, None, None]
- find_datasets(query=None, timeout_seconds=math.inf)#
- Parameters:
query (Optional[roboto.query.Query])
timeout_seconds (float)
- Return type:
collections.abc.Generator[roboto.domain.datasets.Dataset, None, None]
- find_events(query=None, timeout_seconds=math.inf)#
- Parameters:
query (Optional[roboto.query.Query])
timeout_seconds (float)
- Return type:
collections.abc.Generator[roboto.domain.events.Event]
- find_files(query=None, timeout_seconds=math.inf)#
- Parameters:
query (Optional[roboto.query.Query])
timeout_seconds (float)
- Return type:
collections.abc.Generator[roboto.domain.files.File, None, None]
- find_message_paths(query=None, timeout_seconds=math.inf)#
- Parameters:
query (Optional[roboto.query.Query])
timeout_seconds (float)
- Return type:
collections.abc.Generator[roboto.domain.topics.MessagePath, None, None]
- find_topics(query=None, timeout_seconds=math.inf)#
Examples
>>> import matplotlib.pyplot as plt >>> import pandas as pd >>> from roboto import RobotoSearch >>> robosearch = RobotoSearch() >>> for topic in robosearch.find_topics("msgpaths[cpuload.load].max > 0.9"): ... topic_data = list(topic.get_data()) ... df = pd.json_normalize(topic_data) ... plt.plot(df["log_time"], df["load"], label=f"{topic.topic_id}") ... >>> plt.legend() >>> plt.show()
- Parameters:
query (Optional[roboto.query.Query])
timeout_seconds (float)
- Return type:
collections.abc.Generator[roboto.domain.topics.Topic, None, None]
- classmethod for_roboto_client(roboto_client, org_id=None)#
- Parameters:
roboto_client (roboto.http.RobotoClient)
org_id (Optional[str])
- Return type: