Client — Renku 0.1.0.dev20180518 documentation

Join us on GitHub

# Client

## Creating a client

There are several ways to instantiate a client used for communication with the Renku platform.

1. The easiest way is by calling the function `from_env()` when running in an environment created by the Renku platform itself.
2. The client can be created from a local configuration file by calling `from_config()`.
3. Lastly, it can also be configured manually by instantiating a `RenkuClient` class.

`renku.client.` `from_env`()

  Return a client configured from environment variables.

  `RENKU_ENDPOINT`

    The URL to the Renku platform.

  `RENKU_ACCESS_TOKEN`

    An access token obtained from Renku authentication service.

  Example:

      >>> import renku
      >>> client = renku.from_env()

`renku.cli._client.` `from_config`()

  Create a new client for endpoint in the config.

  Use `renku` command-line interface to manage multiple configurations.

## Client reference

class `renku.client.` `RenkuClient`

  A client for communicating with a Renku platform.

  Example:

      >>> import renku
      >>> client = renku.RenkuClient('http://localhost')

  Create a Renku API client.