Python-digitalocean authentication
From wikinotes
Python-digitalocean uses environment variables to communicate the credentials and endpoint.
NOTE:
Your Access Token Determines the digitalocean account you are querying.
The endpoint is always https://api.digitalocean.com/v2/droplets
Code
manager = digitalocean.Manager(
token="secretspecialuniquesnowflake",
end_point="http://example.com/"
)
Environment
export DIGITALOCEAN_END_POINT=http://example.com/
export DIGITALOCEAN_ACCESS_TOKEN='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'