Secret module

A secret is an object containing sensitive information or confidential data such as a password, SSH private key, SSL certificate. It grants access to private git repositories and private docker images so that the platform can build source code in private git repositories or use private docker images.

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


Create a new Secret on the Platform under the project.


secret (Secret) – Secret object

Return type


Following example demonstrates the use of this method for creating a new Secret.

>>> from rapyuta_io.clients.secret import Secret, SecretConfigSourceBasicAuth
>>> client = Client(auth_token='auth_token', project='project_guid')
>>> secret_config = SecretConfigSourceBasicAuth('user', 'password')
>>> secret = Secret('secret-name', secret_config)
>>> client.create_secret(secret)

Delete a secret using its GUID.


guid (str) – Project’s GUID

Following example demonstrates how to delete a Secret using this method.

>>> client = Client(auth_token='auth_token', project='project_guid')
>>> client.delete_secret('secret-guid')

Get a Secret using its GUID.


guid (str) – Secret’s GUID

Return type


Following example demonstrates how a Secret can be fetched using this method.

>>> client = Client(auth_token='auth_token', project='project_guid')
>>> client.get_secret('secret-guid')

List all the Secrets under the Project on the Platform.


A list of all available Secrets under the selected Project.

Return type


Following example demonstrates how to fetch the list of all Secrets.

>>> client = Client(auth_token='auth_token', project='project_guid')
>>> client.list_secrets()

Secret Module

class Secret(name, secret_config)

Secret is a resource that let’s the IO Platform access private resources (Git or Docker Repositories) from third-party providers.

  • name – Name of the Secret

  • guid – GUID of the Secret

  • secret_type – Type of the Secret

  • created_at – Creation Time of the Secret

  • creator – Create of the Secret


Delete the secret using the secret object.

Following example demonstrates how to delete a secret using secret object:

>>> from rapyuta_io import Client
>>> client = Client(auth_token='auth_token', project='project_guid')
>>> secret = client.get_secret(guid='secret-id')
>>> secret.delete()
class SecretConfigDocker(username, password, email, registry='')

SecretConfigDocker represents Docker Secret for Docker registries. This type of secrets can be used to access private Docker repositories for either pulling base images or pushing the images from Builds.

  • username (str) – Username for the Container Registry

  • password (str) – Password/Token for the Container Registry

  • registry (str) – The URL for the Container Registry, by default it uses DockerHub Registry

class SecretType(value)

SecretType is a Enum type defining different types of Secrets possible on the Platform.

SecretType can be any of the following types