Skip to main content

Audit your Digital Ocean account and make sure you know what's up

Project description

Build status PyPI version Python versions License

Audit your Digital Ocean account and make sure you know what’s up.

The script can currently list your droplets and domains information and has a ping-domains command which sends a test request to all your domains and checks the response for you.

Built to suit our own needs - which it did - but feel free to propose or implement new features.


>From PyPI (recommended):

$ pip install do-audit

With git clone:

$ git clone
$ pip install -r do-audit/requirements.txt
$ cd do-audit/bin


To use the script you’ll need Digital Ocean access token and either save it as an environment variable ($ export DO_ACCESS_TOKEN='...') or pass it explicitly (do-audit -t '...') with each command. Everything else should be pretty straightforward:

$ do-audit --help
Usage: do-audit [OPTIONS] COMMAND [ARGS]...

  Simple command line interface for doing an audit of your Digital Ocean
  account and making sure you know what's up.

  See for more info.

  -t, --access-token TEXT         Digital Ocean API access token.
  -o, --output-file FILENAME      Output file path.
  -f, --data-format [json|xls|yaml|csv|dbf|tsv|html|latex|xlsx|ods]
                                  Output file dat format.
  -v, --verbose                   Show extra information.
  --help                          Show this message and exit.

  account       Show basic account info
  domains       List your domains
  droplets      List your droplets
  ping-domains  Ping your domains and see what's the response


The script has four subcommands, all with the same available options:

$ do-audit account
Status:             active
Droplet limit:      25

Each command has a --verbose option that shows more information:

$ do-audit account -v
Status:             active
Droplet limit:      25
Floating IP limit:  3
UUID:               uuid

Both domains and droplets subcommands work the same way:

$ do-audit droplets
# ubuntu-512mb-lon1-01 (active)
OS:                 Ubuntu 16.04.2x 64
CPU:                1
Memory:             512 MB
Disk:               20 GB
Created at:         Mon, 05/08/17 12:52:22

$ do-audit domains
@                                   A
blog                                A

@                                   A
www                                 A

All commands can be exported to a file:

$ do-audit account -o account.csv
CSV data was successfully exported to 'account.csv'

$ cat account.csv
Email,Status,Droplet limit,active,25

$ do-audit droplets -o droplets.csv -f json
JSON data was successfully exported to 'droplets.json'


Package was tested with the help of py.test and tox on Python 2.7, 3.4, 3.5 and 3.6 (see tox.ini).

To run tests yourself you need to run tox inside the repository:

$ pip install tox
$ tox


Package source code is available at GitHub.

Feel free to use, ask, fork, star, report bugs, fix them, suggest enhancements, add functionality and point out any mistakes. Thanks!


Developed and maintained by Omni Digital.

Released under MIT License.

Project details

Download files

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

Source Distribution

do-audit-0.1.1.tar.gz (14.3 kB view hashes)

Uploaded source

Built Distribution

do_audit-0.1.1-py2.py3-none-any.whl (19.7 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page