oceanum.datamesh.Catalog — oceanum 0.1.0 documentation

# oceanum.datamesh.Catalog

class oceanum.datamesh.Catalog(json)

  Datamesh catalog This class behaves like an immutable dictionary with the datasource ids as keys

  Attributes

  `ids` | Return a list of datasource ids

  Methods

  __init__(json)

    Constructor for Catalog class

  keys()

    Return a list of datasource ids

  load(id)

    Load datasource

    Parameters

      id – Datasource id

    Returns

      The datasource container

    Return type

      Union[`pandas.DataFrame`, `geopandas.GeoDataFrame`, `xarray.Dataset`]

  async load_async(id)

    Load datasource asynchronously

    Parameters

      id – Datasource id

    Returns

      The datasource container

    Return type

      Couroutine<Union[`pandas.DataFrame`, `geopandas.GeoDataFrame`, `xarray.Dataset`]>

  query(query)

    Make a query on the catalog

    Parameters

      query (Union[`oceanum.datamesh.Query`, dict]) – Datamesh query as a query object or a valid query dictionary

    Returns

      The datasource container

    Return type

      Union[`pandas.DataFrame`, `geopandas.GeoDataFrame`, `xarray.Dataset`]

    Raises

      IndexError – Datasource not in catalog

  async query_async(query)

    Make an asynchronous query on the catalog

    Parameters

      query (Union[`oceanum.datamesh.Query`, dict]) – Datamesh query as a query object or a valid query dictionary

    Returns

      The datasource container

    Return type

      Coroutine<Union[`pandas.DataFrame`, `geopandas.GeoDataFrame`, `xarray.Dataset`]>

    Raises

      IndexError – Datasource not in catalog

previous

oceanum.datamesh.Datasource

next

oceanum.datamesh.Query