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

Retrieves the list of available roots.

subscribe

Subscribes to a specified root.

get_list

Lists datasets in a specified path.

get_info

Retrieves information about a specified dataset.

Fetch / download / upload datasets#

fetch

Retrieves a specified slice (or the entire content) of a dataset.

get_chunk

Retrieves a specified compressed chunk from a dataset.

download

Downloads a dataset to local storage.

upload

Uploads a local dataset to a remote repository.

User management#

adduser

Adds a user to the subscriber.

deluser

Deletes a user from the subscriber.

listusers

Lists the users in the subscriber.

Utility functions#

get_auth_cookie

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

copy

Copies a dataset or directory to a new location.

move

Moves a dataset or directory to a new location.

remove

Removes a dataset or the contents of a directory from a remote repository.

Evaluating expressions#

lazyexpr

Creates a lazy expression dataset in personal 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.

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.