{ "info": { "author": "Tomas Karasek", "author_email": "tom.to.the.k@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# Digital Ocean PYthon wrapper that Sucks Less\n\nInspired by https://github.com/ahmontero/dop and https://github.com/devo-ps/dopy\n\n## Installation\n\n```\npip install dopysl\n```\n\n## Getting Started\n\nCredentials for DigitalOcean API should be passed in environment variables.\nThere is API v1 and v2.\n\nIf you want to use APIv2, you need to find out the api token from https://cloud.digitalocean.com/settings/applications and you shoud set it as envvar:\n\n```sh\nexport DO_API_TOKEN=...\n```\n\nIf you still want to use APIv1 you need to define client ID and API key. **!!!Beware, API key for v1 is different than API token for v2 !!!**. Find it out from https://cloud.digitalocean.com/api_access and set it as:\n\n```sh\nexport DO_CLIENT_ID=...\nexport DO_API_KEY=...\n```\n\n## Usage\n\nYou have to call the dopysl.init() first to authenticate.\n\nTo list all the droplets:\n\n```python\nimport dopysl\ndopysl.init()\nprint dopysl.all_active_droplets()\n```\n\nalternatively more prettily:\n\n```python\nimport dopysl\nimport json\n\npp = lambda chunk: json.dumps(chunk, sort_keys=True, indent=4)\n\ndopysl.init()\npp(dopysl.all_active_droplets())\n```\n\nIf you use APIv2 you can use strings instead of id for regions, sizes, etc.\ni.e. you can do\n\n```python\ndopysl.init()\ndopysl.new_droplet('new_vm', '512mb', 'lamp', 'ams2')\n```\n\nIf you use APIv1 you first need to get ID of those.\n\n# Methods\n\nThe methods of the DoManager are self explanatory; ex.\n\n```\ndopysl.init()\ndopysl.all_active_droplets()\ndopysl.show_droplet('12345')\ndopysl.destroy_droplet('12345')\ndopysl.call_regions()\ndopysl.call_images()\ndopysl.call_ssh_keys()\ndopysl.sizes()\ndopysl.all_domains()\ndopysl.new_droplet('new_droplet', 66, 1601, 1)\n```\n\nThe methods for v.2 API are similar, the only difference\nis using names instead of IDs for domains and slugs for\nsizes, images and datacenters; ex.\n\n```\ndopysl.init()\ndopysl.show_domain('exapmle.com')\ndopysl.new_droplet('new_droplet', '512mb', 'lamp', 'ams2')\n```\n\nMore in https://github.com/t0mk/dopysl/blob/master/dopysl/__init__.py", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/t0mk/dopysl/archive/master.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/t0mk/dopysl", "keywords": null, "license": "The MIT License (MIT)\n\nCopyright (c) 2015 Tomas Karasek\nCopyright (c) 2013 devo.ps\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", "maintainer": null, "maintainer_email": null, "name": "dopysl", "package_url": "https://pypi.org/project/dopysl/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/dopysl/", "project_urls": { "Download": "https://github.com/t0mk/dopysl/archive/master.zip", "Homepage": "https://github.com/t0mk/dopysl" }, "release_url": "https://pypi.org/project/dopysl/0.0.3/", "requires_dist": null, "requires_python": null, "summary": "Digital Ocean PYthon client that Sucks Less", "version": "0.0.3" }, "last_serial": 1387719, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "b9dbe757811d1909ed084ebf2b5bdd59", "sha256": "30f30ff42628dabfd9b322c98f34d858afeb28b68d76f42068245382c1e98d91" }, "downloads": -1, "filename": "dopysl-0.0.2.tar.gz", "has_sig": false, "md5_digest": "b9dbe757811d1909ed084ebf2b5bdd59", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6041, "upload_time": "2015-01-15T13:29:32", "url": "https://files.pythonhosted.org/packages/d2/c2/35176341305ea8f4d1eaf49c13245c1bc59c9a03ede50e51b360da0139f4/dopysl-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "736700cd1f7418d84a4188e6e91bea4c", "sha256": "0cf0f67690eb1fcfc5b32e883d206a58174526f6e5afad9636b691f6dc475e6c" }, "downloads": -1, "filename": "dopysl-0.0.3.tar.gz", "has_sig": false, "md5_digest": "736700cd1f7418d84a4188e6e91bea4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6117, "upload_time": "2015-01-19T10:39:52", "url": "https://files.pythonhosted.org/packages/19/9e/bad3b71c74e368d8f41b60c6639361b86d722c9a0ad9280d25356736b14a/dopysl-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "736700cd1f7418d84a4188e6e91bea4c", "sha256": "0cf0f67690eb1fcfc5b32e883d206a58174526f6e5afad9636b691f6dc475e6c" }, "downloads": -1, "filename": "dopysl-0.0.3.tar.gz", "has_sig": false, "md5_digest": "736700cd1f7418d84a4188e6e91bea4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6117, "upload_time": "2015-01-19T10:39:52", "url": "https://files.pythonhosted.org/packages/19/9e/bad3b71c74e368d8f41b60c6639361b86d722c9a0ad9280d25356736b14a/dopysl-0.0.3.tar.gz" } ] }