Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
DigitalOcean API wrapper for Python
Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
LICENSE
README.md
__init__.py
digitalocean.py
requirements.txt

README.md

DigitalOcean for Python 2 and 3

This is a general wrapper around the DigitalOcean API. It works at least in Python 2.7 and 3.3.

Example Usage:

> api = DigitalOceanAPI(
    MY_CLIENT_ID,
    MY_API_KEY,
    pemfile='/etc/ssl/certs/ca-certificates.pem')

> api.request('droplets')
< {'status': 'OK', 'droplets': [{...}, ...]}

> api.request('droplets', ids=[4242])
< {'status': 'OK', 'droplet': {...}}

> api.request('images')
< {'status': 'OK', 'images': [{'distribution': 'CentOS', ...}, ...]}

> api.request('droplets/new', {
    'name': 'example',
    'size_id': 66,
    'image_id': 473123,
    'region_id': 4})
< {'status': 'OK', 'droplet': {'size_id': 66, ...}}

Credits:

This module was originally inspired by a Gist by Brad Conte (https://gist.github.com/B-Con/6431500).

Something went wrong with that request. Please try again.