Skip to main content

An unofficial wrapper around the Scaleway APIs based on Hammock.

Project description

Scaleway API

This is an unofficial wrapper around the Scaleway APIs based on Hammock.

Usage

from scaleway_api import Scaleway

scw = Scaleway("nl-ams", "<SECRET KEY>")
servers = scw.instance.servers.GET()

for server in servers.json().get("servers", {}):
    print(f'Server Name: {server["name"]}')

Environment Variables

The Scaleway API will try to pull the following environment variables for convencience.

Environment Variable Description
SCW_SECRET_KEY Your Scaleway key. More information can be found in Scaleway's documentation
SCW_DEFAULT_REGION Should be either nl-ams or fr-par (Default: fr-par)
SCW_DEFAULT_ZONE Should be either nl-ams-1 or fr-par-1 (Default: REGION-1 / fr-par-1)
SCW_API_VERSION Currently only v1 is available. Added to future-proof the library.

Development

Happy to receive pull requests.

Setup

python3 setup.py install
pip install -r requirements-dev.txt

Test

python3 setup.py test

Coverage Report

coverage run -m unittest discover && coverage report

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

scaleway-api-0.0.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distributions

scaleway_api-0.0.1-py3.8.egg (5.5 kB view details)

Uploaded Egg

scaleway_api-0.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file scaleway-api-0.0.1.tar.gz.

File metadata

  • Download URL: scaleway-api-0.0.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for scaleway-api-0.0.1.tar.gz
Algorithm Hash digest
SHA256 181099c399cc5ab21d6d6e5d2ac32279043ff1d616e8e4d819d6ef4784b41f83
MD5 8fc97eca7e8a385a0007de1a1f614965
BLAKE2b-256 e46089e3e1a8c411c1405da8a8a2fe89533b536ca085ca787297b24827ea7ae8

See more details on using hashes here.

File details

Details for the file scaleway_api-0.0.1-py3.8.egg.

File metadata

  • Download URL: scaleway_api-0.0.1-py3.8.egg
  • Upload date:
  • Size: 5.5 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for scaleway_api-0.0.1-py3.8.egg
Algorithm Hash digest
SHA256 6c6c8aa67c1aaa4b579e56a441516cacb4f8e7d1d25eecb9779cc904faa60943
MD5 9e19695e70430cf1c5b03d66421469cf
BLAKE2b-256 ce2ece2558f83c0f1c26e7efa0189d51124d108ae419932531754a27968e7cdf

See more details on using hashes here.

File details

Details for the file scaleway_api-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: scaleway_api-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for scaleway_api-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a9a149f9e023a1fbb8928b243040b7317d1e1bd679b8d44b7448ea73e75e74ba
MD5 d216a742b6a8497793dd8b125222105c
BLAKE2b-256 c78530f982937e9371ce5555d820df9fdc51631034141e37ee3dfdaf9ce7222c

See more details on using hashes here.

Supported by

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