{ "info": { "author": "Micah Lee", "author_email": "micah@micahflee.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python :: 3", "Topic :: Internet" ], "description": "# DigitalOcean CLI tool\n\nA simple command line tool for listing, creating, and deleting DigitalOcean\ndroplets.\n\n## Getting started\n\nInstall `do-cli` with pip3, like:\n\n```sh\npip3 install do-cli\n```\n\nYou need to store a DigitalOcean API key in the `DO_API_KEY` environment\nvariable, like this:\n\n```\nexport DO_API_KEY=[your_api_key_here]\n```\n\nYou can run that line to set the environment variable. But, if you want,\nyou can also copy that line into your `~/.bashrc` file so it always gets\nautomatically set. Be careful to protect your API key though. Anyone who\nhas it can create/delete DigitalOcean VPSes in your account.\n\n## Usage\n\nFirst, choose a sub-command, either `list`, `create`, or `delete`:\n\n```\n$ do-cli -h\nusage: do [-h] {list,create,delete} ...\n\npositional arguments:\n {list,create,delete}\n list List droplets\n create Create a new droplet\n delete Delete a droplet\n\noptional arguments:\n -h, --help show this help message and exit\n```\n\nListing doesn't require any extra arguments.\n\nCreating requires a name, and you can optionally choose size, image, and\nregion for the droplet that you'll be creating. Note that `do-cli` will\nautomatically upload the SSH public key it finds in `~/.ssh/id_rsa.pub`\nto your account if it's not already there, and add it to the new droplet\nthat gets created.\n\n```\n$ do-cli create -h\nusage: do create [-h] [--size SIZE] [--image IMAGE] [--region REGION] name\n\npositional arguments:\n name Name of droplet\n\noptional arguments:\n -h, --help show this help message and exit\n --size SIZE Size (in RAM) of the droplet (default: 512mb)\n --image IMAGE Base image of the droplet (default: ubuntu-18-10-x64)\n --region REGION Region of the droplet (default: sfo2)\n```\n\nDeleting requires a droplet id, which you can get by running list. When\ndeleting a droplet, you *must* include the optional flag `--force` or\nelse it won't delete it.\n\n```\n$ do-cli delete -h\nusage: do delete [-h] [--force] id\n\npositional arguments:\n id Id of droplet\n\noptional arguments:\n -h, --help show this help message and exit\n --force Required to actually delete the droplet\n```\n\n# Example\n\nMy DigitalOcean account doesn't have any droplets yet, so I'll create one:\n\n```\n$ do-cli create test1\nAdded your SSH key, 'user@dev' to DigitalOcean\nDroplet IP address id Memory Disk Region\n--------- ------------ --------- -------- ------ --------\ntest1 115661631 512 20 sfo2\n```\n\nNotice that `do-cli` added my SSH key to DigitalOcean. The IP address of the\nnew droplet isn't shown yet because it was just created, but I can run\nlist to see it:\n\n```\n$ do-cli list\nDroplet IP address id Memory Disk Region\n--------- --------------- --------- -------- ------ --------\ntest1 138.68.12.60 115661631 512 20 sfo2\n```\n\nGreat, now I'll add a second droplet, but this time in New York instead\nof San Francisco, and with 1GB of RAM instead of 512MB.\n\n```\n$ do-cli create test2 --size 1gb --region nyc1\nDroplet IP address id Memory Disk Region\n--------- ------------ --------- -------- ------ --------\ntest2 115661894 1024 30 nyc1\n```\n\nNow I'm going to look at my list of droplets:\n\n```\n$ do-cli list\nDroplet IP address id Memory Disk Region\n--------- --------------- --------- -------- ------ --------\ntest1 138.68.12.60 115661631 512 20 sfo2\ntest2 159.65.229.223 115661894 1024 30 nyc1\n```\n\nNow I'm going to delete my test1 droplet:\n\n```\n$ do-cli delete test1\nThe resource you were accessing could not be found.\n```\n\nThis doesn't work because I was supposed to supply the id of the droplet,\nnot the name. (This is important because ids are unique and names aren't.\nYou can have multiple droplets with the same name.) Let's try again, but\nthis time with the id \"115661631\".\n\n```\n$ do-cli delete 115661631\nTo delete the following droplet, run again with --force.\n\nDroplet IP address id Memory Disk Region\n--------- ------------ --------- -------- ------ --------\ntest1 138.68.12.60 115661631 512 20 sfo2\n```\n\nAlmost. To avoid accidentally permanently deleting the wrong droplet, you\nhave to pass `--force` into `do-cli`.\n\n```\n$ do-cli delete 115661631 --force\nThe following droplet has been deleted.\n\nDroplet IP address id Memory Disk Region\n--------- ------------ --------- -------- ------ --------\ntest1 138.68.12.60 115661631 512 20 sfo2\n```\n\nIt's been deleted. Let's list droplets now.\n\n```\n$ do-cli list\nDroplet IP address id Memory Disk Region\n--------- --------------- --------- -------- ------ --------\ntest2 159.65.229.223 115661894 1024 30 nyc1\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/micahflee/do", "keywords": "", "license": "GPLv3+", "maintainer": "", "maintainer_email": "", "name": "do-cli", "package_url": "https://pypi.org/project/do-cli/", "platform": "", "project_url": "https://pypi.org/project/do-cli/", "project_urls": { "Homepage": "https://github.com/micahflee/do" }, "release_url": "https://pypi.org/project/do-cli/0.1.1/", "requires_dist": [ "colored", "tabulate", "dopy" ], "requires_python": ">=3.4", "summary": "A simple command line tool for listing, creating, and deleting DigitalOcean droplets.", "version": "0.1.1" }, "last_serial": 4392195, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7543c179d5be1e9df28d607b4b27c3d9", "sha256": "6b23aa0b9fd39bf2ff08c59fe93ab59f4bc93cb3a07912943831d1ed01e0dd90" }, "downloads": -1, "filename": "do_cli-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7543c179d5be1e9df28d607b4b27c3d9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 16961, "upload_time": "2018-10-18T22:50:41", "url": "https://files.pythonhosted.org/packages/27/1a/bd3d01f12671260d83f04129afbabf08d5671b9c52d1432e132224d34db9/do_cli-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "505aba14fadd03611ad5cdf11030047a", "sha256": "a7ee4a60b2f919ad619c8984cdfb3fd5f497d6ee9ba224b9a3fbe2da59e1b50b" }, "downloads": -1, "filename": "do-cli-0.1.0.tar.gz", "has_sig": false, "md5_digest": "505aba14fadd03611ad5cdf11030047a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 4681, "upload_time": "2018-10-18T22:50:43", "url": "https://files.pythonhosted.org/packages/b4/e8/420bd5160c9fbae3b3a3dc792ad2eda7aa72246d794f514b7b2219c0690c/do-cli-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "45c83c4d4f7970bab4da3789b6e85347", "sha256": "35e77900888faebc38b049f64ed9e6c414656d13204985c76282155378c553fe" }, "downloads": -1, "filename": "do_cli-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "45c83c4d4f7970bab4da3789b6e85347", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 16975, "upload_time": "2018-10-18T22:55:28", "url": "https://files.pythonhosted.org/packages/cb/cf/0e565c0963eee201c1a39b9a6931b21b2a7bc8ca9402e40134a9c13ceb07/do_cli-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "87739bf75779dc74eaa7d950f193532f", "sha256": "e9fa91194dc4ac77acf8aee1401c08410ce6922eab09c111fbc49e2e01bdcbfd" }, "downloads": -1, "filename": "do-cli-0.1.1.tar.gz", "has_sig": false, "md5_digest": "87739bf75779dc74eaa7d950f193532f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 4683, "upload_time": "2018-10-18T22:55:29", "url": "https://files.pythonhosted.org/packages/21/d0/d854efce521463ea14467ea91c9b96d639fd82d4ea54836061068c863458/do-cli-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "45c83c4d4f7970bab4da3789b6e85347", "sha256": "35e77900888faebc38b049f64ed9e6c414656d13204985c76282155378c553fe" }, "downloads": -1, "filename": "do_cli-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "45c83c4d4f7970bab4da3789b6e85347", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 16975, "upload_time": "2018-10-18T22:55:28", "url": "https://files.pythonhosted.org/packages/cb/cf/0e565c0963eee201c1a39b9a6931b21b2a7bc8ca9402e40134a9c13ceb07/do_cli-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "87739bf75779dc74eaa7d950f193532f", "sha256": "e9fa91194dc4ac77acf8aee1401c08410ce6922eab09c111fbc49e2e01bdcbfd" }, "downloads": -1, "filename": "do-cli-0.1.1.tar.gz", "has_sig": false, "md5_digest": "87739bf75779dc74eaa7d950f193532f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 4683, "upload_time": "2018-10-18T22:55:29", "url": "https://files.pythonhosted.org/packages/21/d0/d854efce521463ea14467ea91c9b96d639fd82d4ea54836061068c863458/do-cli-0.1.1.tar.gz" } ] }