Python wrapper for Digital Ocean API V2
Project description
Python wrapper for Digital Ocean API V2.
Installation
pip install dosa
Usage
import dosa
API_KEY = 'Your API Key'
dosa.DEBUG = True # enables debug logs
client = dosa.Client(api_key=API_KEY)
# Droplets
client.droplets.list()
status, result = client.droplets.create(name='terminator', region='nyc2',\
size='512mb', image='ubuntu-14-04-x32', ssh_keys=[12345])
new_droplet_id = result['id']
client.droplets.delete(new_droplet_id)
# SSH Keys
pub_key = open('~/.ssh/id_rsa.pub').read()
client.keys.create(name='RSA key', public_key=pub_key)
client.keys.list()
# Images
client.images.list()
Credits
Created while working on Scroll.in’s project.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dosa-0.3.tar.gz
(2.8 kB
view details)
File details
Details for the file dosa-0.3.tar.gz
.
File metadata
- Download URL: dosa-0.3.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 318b83593a78b1fc37beafae91595f72a71f96ac480a57675ca14f2a904c1c2e |
|
MD5 | b10bc15970a0fd2bd0418211e683ef85 |
|
BLAKE2b-256 | afb883828839408cc2f958e01db1de8e469602658c7ebc5798836d294329ec4f |