Top level API#

This API is meant to be used from clients. It provides functions for getting roots, subscribing, listing datasets, fetching and downloading datasets.

Getting roots, subscribing and listing datasets#

get_roots

Get the list of available roots.

subscribe

Subscribe to a root.

get_list

List the nodes in a root.

get_info

Get information about a dataset.

Fetch / download datasets#

fetch

Fetch (a slice of) the data in a dataset.

download

Download a dataset to storage.

Evaluating expressions#

lazyexpr

Create a lazy expression dataset in scratch space.

Utility variables#

Variables listed below as coming from the api module are available from the top level module too.

__version__

The version in use of the Caterva2 package.

api.bro_host_default

The default HTTP endpoint for the broker (URL host & port).

api.pub_host_default

The default HTTP endpoint for the publisher (URL host & port).

api.sub_host_default

The default HTTP endpoint for the subscriber (URL host & port).

api.sub_urlbase_default

The default base of URLs provided by the subscriber (slash-terminated).

Helper functions#

These functions from the api_utils module may ease the use of the top level API.

api_utils.get_auth_cookie(urlbase, user_auth)

Authenticate to a subscriber as a user and get an authorization cookie.