Client class#

A client is a remote repository that can be subscribed to. It is the main entry point for using the Caterva2 API.

Constructor#

Client.__init__(urlbase[, auth])

Creates a client for server in urlbase.

Getting roots, files, datasets, subscribing…#

Client.get(path)

Returns an object for the given path.

Client.get_roots()

Retrieves the list of available roots.

Client.get_list(path)

Lists datasets in a specified path.

Client.subscribe(root)

Subscribes to a specified root.

Fetch / download / upload datasets#

Client.fetch(path[, slice_])

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

Client.get_chunk(path, nchunk)

Retrieves a specified compressed chunk from a file.

Client.download(dataset[, localpath])

Downloads a dataset to local storage.

Client.upload(localpath, dataset)

Uploads a local dataset to a remote repository.

User management#

Client.adduser(newuser[, password, superuser])

Adds a user to the subscriber.

Client.deluser(user)

Deletes a user from the subscriber.

Client.listusers([username])

Lists the users in the subscriber.

Utility methods#

Client.append(remotepath, data)

Appends data to the remote location.

Client.copy(src, dst)

Copies a dataset or directory to a new location.

Client.move(src, dst)

Moves a dataset or directory to a new location.

Client.remove(path)

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

Client.get_info(path)

Retrieves information about a specified dataset.

Evaluating expressions#

Client.lazyexpr(name, expression, operands)

Creates a lazy expression dataset in personal space.