chuwy / dopy

Digital Ocean Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Digital Ocean API Python Wrapper

Inspired by dop.

Installation

# pip install dopy

Getting Started

To interact with Digital Ocean, you first need .. a digital ocean account with valid API keys.

Keys can be set either as Env variables, or within the code.

# export DO_CLIENT_ID='client_id'
# export DO_API_KEY='long_api_key'
>>> from dopy.manager import DoManager
>>> do = DoManager('client_id', 'long_api_key')

Methods

The methods of the DoManager are self explanatory; ex.

>>> do.all_active_droplets()
>>> do.show_droplet('12345')
>>> do.destroy_droplet('12345')
>>> do.all_regions()
>>> do.all_images()
>>> do.all_ssh_keys()
>>> do.sizes()
>>> do.all_domains()
>>> do.new_droplet('new_droplet', 66, 1601, 1)

TODO

See github issue list - post if any needed

https://github.com/devo-ps/dopy/issues

About

Digital Ocean Python

License:MIT License


Languages

Language:Python 100.0%