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

Parameters
  • auth_token (string) – Authentication token

  • project (string) – project_guid of the user

static get_auth_token(email, password)

Generate and fetch a new API Authentication Token.

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

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

Returns

str

Following example demonstrates how to get auth token

>>> from rapyuta_io import Client
>>> auth_token = Client.get_auth_token('email@example.com', 'password')
>>> client = Client(auth_token, 'project-id')
get_authenticated_user()

Get details for authenticated User.

Return type

User

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()