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, token_level=AuthTokenLevel.LOW)¶
Generate and fetch a new API Authentication Token.
- Parameters
- Returns
str
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('email@example.com', 'password', AuthTokenLevel.MED) >>> client = Client(auth_token, 'project-id')