Skip to main content

scaleway python client to interact with the scaleway API

Project description

Scaleway-Py-Client

Rdb :

  • list_instances
  • create_database
  • create_user
  • set_user_privileges
  • update_user
  • delete_user
  • delete_database
from scw_py_client.models.rdb import Privileges, User, Database
from scw_py_client.core import RdbClient

rdbClient = RdbClient()

instances = rdbClient.list_instances()
instance = instances[0]

test_database = rdbClient.create_database(instance=instance, database=Database(name="test_database"))
test_user = rdbClient.create_user(
    instance=instance, user=User(name="test_user"), password=User.Password("password1"))
rdbClient.set_user_privileges(instance=instance, privileges=Privileges(
    database_name=test_database.name, user_name=test_user.name, permission=Privileges.Permission.ReadWrite))
test_user = rdbClient.update_user(instance=instance, user=test_user, password=User.Password("password2"))
rdbClient.delete_user(instance=instances[0], user=test_user)
rdbClient.delete_database(instance=instance, database=test_database)

Registry :

  • list_images
  • get_image
  • update_image
  • delete_image
from scw_py_client.core import RegistryClient

registryClient = RegistryClient()
images = registryClient.list_images()

Functions :

  • list_containers
  • get_container
  • create_container
  • deploy_container
  • update_container
  • delete_container
  • list_namespaces
  • get_namespace
  • create_namespace
  • update_namespace
  • delete_namespace
  • list_functions
  • get_function
  • create_function
  • deploy_function
  • update_function
  • delete_function
  • list_crons
  • get_cron
  • create_cron
  • update_cron
  • delete_cron
  • list_logs
from scw_py_client.core import FunctionsClient

functions_client = FunctionsClient()
containers = functions.list_containers()

Object Storage :

  • list buckets
  • create a bucket
from scw_py_client.core import ObjectStorageClient

object_storage_client = ObjectStorageClient.ObjectStorage()
buckets = object_storage_client.list_buckets()
bucket = object_storage_client.create_bucket("my_bucket_name")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scw-py-client-0.0.1.tar.gz (7.1 kB view hashes)

Uploaded Source

Built Distribution

scw_py_client-0.0.1-py3-none-any.whl (8.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page