Client

Creating a client

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

  1. The easiest way is by calling the function from_env() when running in an environment created by the Renga 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 RengaClient class.
renga.client.from_env()

Return a client configured from environment variables.

RENGA_ENDPOINT

The URL to the Renga platform.

RENGA_ACCESS_TOKEN

An access token obtained from Renga authentication service.

Example:

>>> import renga
>>> client = renga.from_env()
renga.cli._client.from_config()[source]

Create a new client for endpoint in the config.

Use renga command-line interface to manage multiple configurations.

Client reference

class renga.client.RengaClient[source]

A client for communicating with a Renga platform.

Example:

>>> import renga
>>> client = renga.RengaClient('http://localhost')

Create a Renga API client.