Low-level API

This API is built on top of REST API endpoints exposed by Renku services.

Warning

Renku services are currently in beta preview status and they are subject to change in forseenable future.

HTTP clients for Renku platform.

class renku.api.LocalClient(path=NOTHING, renku_home='.renku', datadir='data')[source]

A low-level client for communicating with a local Renku repository.

Example:

>>> import renku
>>> client = renku.LocalClient('.')

Datasets

Client for handling datasets.

class renku.api.datasets.DatasetsApiMixin(datadir='data')[source]

Client for handling datasets.

add_data_to_dataset(dataset, url, git=False, **kwargs)[source]

Import the data into the data directory.

datadir = None

Define a name of the folder for storing datasets.

with_dataset(name=None)[source]

Yield an editable metadata object for a dataset.

renku.api.datasets.check_for_git_repo(url)[source]

Check if a url points to a git repository.

Repository

Client for handling a local repository.

class renku.api.repository.PathMixin(path=NOTHING)[source]

Define a default path attribute.

class renku.api.repository.RepositoryApiMixin(renku_home='.renku')[source]

Client for handling a local repository.

LOCK_SUFFIX = '.lock'

Default suffix for Renku lock file.

METADATA = 'metadata.yml'

Default name of Renku config file.

WORKFLOW = 'workflow'

Directory for storing workflow in Renku.

cwl_prefix[source]

Return a CWL prefix.

find_previous_commit(paths, revision='HEAD')[source]

Return a previous commit for a given path.

git = None

Store an instance of the Git repository.

init_external_storage(force=False)[source]

Initialize the external storage for data.

init_repository(name=None, force=False, use_external_storage=True)[source]

Initialize a local Renku repository.

is_cwl(path)[source]

Check if the path is a valid CWL file.

lock

Create a Renku config lock.

renku_home = None

Define a name of the Renku folder (default: .renku).

renku_metadata_path

Return a Path instance of Renku metadata file.

renku_path = None

Store a Path instance of the Renku folder.

track_paths_in_storage(*paths)[source]

Track paths in the external storage.

with_metadata()[source]

Yield an editable metadata object.

with_workflow_storage()[source]

Yield a workflow storage.

workflow_path

Return a Path instance of the workflow folder.