Authentication Module

Authentication module can be used to generate API authentication token.

Client Module

class Client(auth_token, project=None)

Client class provides access to device, package, volume and deployment classes.

__init__(auth_token, project=None)

Get new client object

  • auth_token (string) – Authentication token

  • project (string) – project_guid of the user

static get_auth_token(email, password, token_level=AuthTokenLevel.LOW)

Generate and fetch a new API Authentication Token.

  • email (str) – Email of the user account.

  • password (str) – User password for the account.

  • token_level (AuthTokenLevel) – Level of the token. This corresponds to token validity



Following example demonstrates how to get auth token

>>> from rapyuta_io import Client
>>> from rapyuta_io.clients.rip_client import AuthTokenLevel
>>> auth_token = Client.get_auth_token('', 'password', AuthTokenLevel.MED)
>>> client = Client(auth_token, 'project-id')

Get details for authenticated User.

Return type


Following example demonstrates how to get authenticated user details.

>>> from rapyuta_io import Client
>>> client = Client(auth_token='auth_token', project='project_guid')
>>> user = client.get_authenticated_user()