Skip to content

Instantly share code, notes, and snippets.

@makeittotop
Created March 18, 2015 09:38
Show Gist options
  • Save makeittotop/2b9d3e5493f0a537836c to your computer and use it in GitHub Desktop.
Save makeittotop/2b9d3e5493f0a537836c to your computer and use it in GitHub Desktop.
Create a digitalocean droplet on the fly. I put this in a flask web app to speed up the process even more.
#!/usr/bin/env python
import digitalocean
droplet = digitalocean.Droplet(
token="****",
name='test',
region='nyc2', # NewYork 2
image='ubuntu-14-04-x64', # ubuntu 14.04 x64
size_slug='512mb', # 512MB
backups=False
)
# Create the droplet
droplet.create()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment