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 datasets in a path.

get_info

Get information about a dataset.

Fetch / download / upload datasets#

fetch

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

get_chunk

Get the unidimensional compressed chunk of a dataset.

download

Download a dataset to storage.

upload

Upload a local dataset to a remote repository.

User management#

adduser

Add a user to the subscriber.

deluser

Delete a user from the subscriber.

listusers

List the users in the subscriber.

Utility functions#

get_auth_cookie

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

copy

Copy a dataset or directory to a new location.

move

Move a dataset or directory to a new location.

remove

Remove a dataset or directory path from a remote repository.

Evaluating expressions#

lazyexpr

Create 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.