Skip to content

Instantly share code, notes, and snippets.

@remyleone
Created March 14, 2018 09:44
Show Gist options
  • Select an option

  • Save remyleone/7e0c504ac0c5a37ef37c7b0efe997725 to your computer and use it in GitHub Desktop.

Select an option

Save remyleone/7e0c504ac0c5a37ef37c7b0efe997725 to your computer and use it in GitHub Desktop.
import os
import requests
token = os.getenv('SCW_TOKEN', "Insert your API Token here if you don't want to define environment variable")
def test_list_all_images():
"""
Request to list all images present on your account
"""
r = requests.get("https://api.scaleway.com/images",
headers={'X-Auth-Token': token,
"Content-Type": "application/json"})
print(r.text)
assert r.ok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment