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.
Installation
>From PyPI (recommended):
$ pip install do-audit
With git clone:
$ git clone https://github.com/omni-digital/do-audit
$ pip install -r do-audit/requirements.txt
$ cd do-audit/bin
Usage
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 https://github.com/omni-digital/do-audit for more info.
Options:
-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.
Commands:
account Show basic account info
domains List your domains
droplets List your droplets
ping-domains Ping your domains and see what's the response
Examples
The script has four subcommands, all with the same available options:
$ do-audit account Email: user@example.com Status: active Droplet limit: 25
Each command has a --verbose option that shows more information:
$ do-audit account -v Email: user@example.com 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 IP: 192.168.1.0 CPU: 1 Memory: 512 MB Disk: 20 GB URL: https://cloud.digitalocean.com/droplets/2/graphs Created at: Mon, 05/08/17 12:52:22 $ do-audit domains # example.com @ A 192.168.0.1 blog A 192.168.0.1 # example.co.uk @ A 192.168.0.2 www A 192.168.0.2
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 user@example.com,active,25 $ do-audit droplets -o droplets.csv -f json JSON data was successfully exported to 'droplets.json'
Tests
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
Contributions
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!
Metadata
Release files for do-audit 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| do-audit-0.1.1.tar.gz | 14.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| do_audit-0.1.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 34.0 kB
Release files / do-audit-0.1.1.tar.gz
| Download URL | do-audit-0.1.1.tar.gz |
|---|---|
| Size | 14.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c98c22a33abf0fab3af572e9630d31dd250d4f24469fb4cfc1b5f97159332a71
|
|
BLAKE2b-256 checksum How to use checksums |
477acbd4f7dc1c7609f885a4cf48643798727bc026744f890e74c1111c504235
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / do_audit-0.1.1-py2.py3-none-any.whl
| Download URL | do_audit-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
47566a6a472bc784c0c7fd6a4a192d2b2299641adc48129d3ad1aafb5b7e1e1e
|
|
BLAKE2b-256 checksum How to use checksums |
ca345983d5a893b75516a7bfa454fd944d85ce0164f2086feb4a2a0b19e52d4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for do-audit 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.