Any rapyuta.io resource that you create, or allocate and use must belong to a project. You can think of a project as the organizational unit for what you are building. A project is made up of the settings, configuration, and other metadata that describe your applications. Resources within a single project can work together easily, for example, by communicating through an internal network. The resources that each project contains remain separate across project boundaries; you can only interconnect them through an external connection.
Each project has:
Auto-generated unique project ID
A project name, which you provide.
miscellaneous metadata: e.g., creator name, timestamp, etc.
You may create multiple projects and use them to organize rapyuta.io resources.
Client class provides access to device, package, volume and deployment classes.
Get new client object
auth_token (string) – Authentication token
project (string) – project_guid of the user
Create a new Project
Following example demonstrates the use of this method for creating a new Project.
>>> from rapyuta_io.clients.project import Project >>> client = Client(auth_token='auth_token') >>> proj = Project('project-name') >>> client.create_project(proj)
Delete a Project from the platform.
guid (str) – Project’s GUID
Following example demonstrates how to delete a Project using this method.
>>> client = Client(auth_token='auth_token') >>> client.delete_project('project-guid')
Get a Project from its GUID.
Following example demonstrates how a Project can be fetched using this method.
>>> client = Client(auth_token='auth_token') >>> client.get_project('project-guid')
Get a list of all the Projects.
A list of all available Projects for the user.
- Return type
Following example demonstrates how to fetch the list of all Projects.
>>> client = Client(auth_token='auth_token') >>> client.list_projects()
Sets the current Project for the Client.
project_guid – GUID of the Project
Following example demonstrates how to set the Project for the Client.
>>> from rapyuta_io import Client >>> client = Client(auth_token='auth_token', project='project_guid') >>> project = client.create_project(Project('secret-guid')) >>> client.set_project(project.guid) >>> persistent_volume = client.get_persistent_volume()
Project is an organizational unit and all the resources must belong to a Project.
User(first_name, last_name, email_id, state='ACTIVATED', role='Admin')¶
User is the representation of a Human user on the Platform. Users can be part of one of more Projects.
Enumeration variables for UserState.
UserState can be any of the following types