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.
APIClient
(endpoint=None, **kwargs)[source]
A low-level client for communicating with a Renku Platform API.
Example:
>>> import renku
>>> client = renku.APIClient('http://localhost')
Create a remote API client.
-
delete
(*args, **kwargs)[source]
Perform the DELETE
request and check its status code.
-
endpoint
Return endpoint value.
-
get
(*args, **kwargs)[source]
Perform the GET
request and check its status code.
-
post
(*args, **kwargs)[source]
Perform the POST
request and check its status code.
-
put
(*args, **kwargs)[source]
Perform the PUT
request and check its status code.
-
class
renku.api.
LocalClient
(renku_home='.renku', datadir='data', path=NOTHING)[source]
A low-level client for communicating with a local Renku repository.
Example:
>>> import renku
>>> client = renku.LocalClient('.')
Projects
Client for handling projects.
-
class
renku.api.projects.
ProjectsApiMixin
[source]
Client for handling projects.
-
create_project
(project)[source]
Create a new project and register it on the knowledge graph.
-
get_project
(project_id)[source]
Get existing project.
-
list_projects
()[source]
Return an iterator for all projects.
Storage
Client for storage service.
-
class
renku.api.storage.
BucketsApiMixin
[source]
Client for handling storage buckets.
-
create_bucket
(**kwargs)[source]
Create a new storage bucket.
-
storage_bucket_metadata_replace
(resource_id, data)[source]
Replace resource metadata.
-
storage_info
()[source]
Return information about available bucket backends.
-
class
renku.api.storage.
FilesApiMixin
[source]
Client for handling file objects in a bucket.
-
create_file
(**kwargs)[source]
Create a new file object.
-
storage_authorize
(resource_id=None, request_type=None)[source]
Request authorization token for performing file handle request.
-
storage_copy_file
(resource_id=None, file_name=None, **kwargs)[source]
Request a file copy.
-
storage_file_metadata_replace
(resource_id, data)[source]
Replace resource metadata.
-
storage_io_read
(*args, **kwargs)[source]
Write data to the file.
Note
Use only with access_token
issued by storage service.
-
storage_io_write
(data)[source]
Write data to the file.
Note
Use only with access_token
issued by storage service.
Deployer
Client for deployer service.
-
class
renku.api.deployer.
ContextsApiMixin
[source]
Manage deployer contexts.
-
create_context
(spec)[source]
Create a new deployer context.
-
create_execution
(context_id, **kwargs)[source]
Create an execution of a context on a given engine.
-
execution_logs
(context_id, execution_id)[source]
Retrieve logs of an execution.
-
execution_ports
(context_id, execution_id)[source]
Retrieve port mappings for an execution.
-
get_context
(context_id)[source]
List all known contexts.
-
get_execution
(context_id, execution_id)[source]
Retrieve an execution.
-
list_contexts
()[source]
List all known contexts.
-
list_executions
(context_id)[source]
List all executions of a given context.
-
stop_execution
(context_id, execution_id)[source]
Stop a running execution.