oscar_colony.colony_management.pyrat.api.get_pyrat_lines#
- oscar_colony.colony_management.pyrat.api.get_pyrat_lines(max_n_rows=10000)[source]#
Fetch available lines directly from the pyRAT api.
To handle the potentially large number of lines returned from pyRAT, this function returns a generator of pandas dataframes (each with no more than max_n_rows).
This expects PYRAT_URL, PYRAT_CLIENT_TOKEN and PYRAT_USER_TOKEN to be set as environment variables.
- Parameters:
max_n_rows (
int) – Maximum number of lines in each returned dataframe (and therefore returned per request to the pyRAT api)- Returns:
Generator of dataframes of returned line data, each with columns: name and id. Names are in alphabetical order. Id is useful for fetching line mutations via get_pyrat_line_mutations. If no data is available for the query, the dataframe will be empty.
- Return type:
Iterator[DataFrame]