This is an unofficial wrapper around the Scaleway APIs based on Hammock.
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"]}')
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. |
Happy to receive pull requests.
python3 setup.py install
pip install -r requirements-dev.txt
python3 setup.py test
coverage run -m unittest discover && coverage report