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=<function default_path>, renku_home='.renku', parent=None, use_external_storage=True, 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.
-
DATASETS
= 'datasets'¶ Directory for storing dataset metadata in Renku.
-
add_data_to_dataset
(dataset, url, git=False, force=False, **kwargs)[source]¶ Import the data into the data directory.
-
datadir
= None¶ Define a name of the folder for storing datasets.
-
datasets
¶ Return mapping from path to dataset.
-
renku_datasets_path
¶ Return a
Path
instance of Renku dataset metadata folder.
-
Repository¶
Client for handling a local repository.
-
class
renku.api.repository.
PathMixin
(path=<function default_path>)[source]¶ Define a default path attribute.
-
class
renku.api.repository.
RepositoryApiMixin
(renku_home='.renku', parent=None)[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.
-
lock
¶ Create a Renku config lock.
-
parent
= None¶ Store a pointer to the parent repository.
-
process_commit
(commit=None, path=None)[source]¶ Build an
Activity
instance.Parameters: - commit – Commit to process. (default:
HEAD
) - path – Process a specific CWL file.
- commit – Commit to process. (default:
-
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.
-
workflow_path
¶ Return a
Path
instance of the workflow folder.
-
Git Internals¶
Wrap Git client.
-
class
renku.api._git.
GitCore
[source]¶ Wrap Git client.
-
candidate_paths
¶ Return all paths in the index and untracked files.
-
dirty_paths
¶ Get paths of dirty files in the repository.
-
modified_paths
¶ Return paths of modified files.
-
repo
= None¶ Store an instance of the Git repository.
-
Git utilities.
-
class
renku.models._git.
GitURL
(href, pathname=None, protocol='ssh', hostname='localhost', username=None, password=None, port=None, owner=None, name=None, regex=None)[source]¶ Parser for common Git URLs.
-
image
¶ Return image name.
-