Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Digital Ocean API Python Wrapper

Inspired by [dop](https://github.com/ahmontero/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.

For API v.2.

# export DO_API_VERSION='2'
# export DO_API_TOKEN='api_token'
>>> from dopy.manager import DoManager
>>> do = DoManager(None, 'api_token', api_version=2)

For API v.1.

# 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)

The methods for v.2 API are similar, the only difference is using names instead of IDs for domains and slugs for sizes, images and datacenters; ex.

>>> do.show_domain('exapmle.com')
>>> do.new_droplet('new_droplet', '512mb', 'lamp', 'ams2')

TODO

See github issue list - post if any needed

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dopy-0.3.7a.tar.gz (6.5 kB view details)

Uploaded Source

File details

Details for the file dopy-0.3.7a.tar.gz.

File metadata

  • Download URL: dopy-0.3.7a.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dopy-0.3.7a.tar.gz
Algorithm Hash digest
SHA256 715e6c69ae54b055e88538cc39c6a7a5793ea4d4f30275cdbb3c891ab7c1c555
MD5 cf5c95287af0aca2e320be1569e197bd
BLAKE2b-256 76768032cbc81e0192432a1137dede3b03195c2ece50097f4c38455ac35c487e

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.7

1 file

This release

0.3.7a This release

1 file

0.3.6

1 file

0.3.5

1 file

0.3.4

1 file

0.3.3

1 file

0.3.2

0.3.0

1 file

0.2.5

1 file

0.2.4

1 file

0.2.3

1 file

0.2.2

1 file

0.2.1

1 file

0.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page