{ "info": { "author": "Benjamin Fagin", "author_email": "blouis@unquietcode.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# runbook.py (v0.2)\n`pip3 install runbook`\n\nInspired by [this blog post](https://blog.danslimmon.com/2019/07/15/do-nothing-scripting-the-key-to-gradual-automation)\nby Dan Slimmon.\n\nDefine your own run-book in a class extending from `Runbook`. Every method that\ndoesn't begin with an underscore is read in as a step to be completed, in order.\nThe step name will be built from the method name, and the description is taken\neither from the method's own docstring or from any data returned from invoking\nthe method.\n\n```python\nfrom runbook import Runbook\n\n\nclass CustomRunbook(Runbook):\n \n def first_step(self):\n \"\"\"\n Do ABC now.\n \"\"\"\n \n def second_step():\n \"\"\"\n Do EFG then wait 1 hour.\n \"\"\"\n\n def third_step():\n task = \"reboot\"\n return f\"perform a {task}\"\n \n @staticmethod\n def last_step():\n \"\"\"Everything ok?\"\"\"\n```\n\nEvery `Runbook` object comes with a default main method that you can use to execute the script.\n\n```python\nif __name__ == '__main__':\n CustomRunbook.main()\n```\n\nThe run-book object can also be instantiated and run directly.\n\n```python\nbook = CustomRunbook(file_path=\"path/to/file\")\nbook.run()\n```\n\n**You should avoid using the step names `run` and `main`**, which are already defined. If you need to override these\nmethods to define custom behavior then that is fine.\n\nAs steps are completed, the results are written out to a log file. You can set a custom log file path by passing\nan argument to main, as in:\n\n```\npython3 my_runbook.py output.log\n```\n\nWhen reusing the same log file, already completed steps will be skipped. Any new steps found in the `Runbook`\nand not already in the log will be processed as normal, with results appended to the end of the file.\n\n### License\nLicensed under the Apache Software License 2.0 (ASL 2.0).", "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/UnquietCode/runbook.py", "keywords": "runbook playbook process", "license": "OSI Approved :: Apache Software License", "maintainer": "", "maintainer_email": "", "name": "runbook", "package_url": "https://pypi.org/project/runbook/", "platform": "", "project_url": "https://pypi.org/project/runbook/", "project_urls": { "Homepage": "https://github.com/UnquietCode/runbook.py" }, "release_url": "https://pypi.org/project/runbook/0.2/", "requires_dist": null, "requires_python": "", "summary": "a tool for defining repeatable processes in code", "version": "0.2", "yanked": false, "yanked_reason": null }, "last_serial": 6045102, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "4dd8261101dcbdfbcd4df9e13cd46862", "sha256": "dca39a498e2d61fe620bcdd4726601df623497c02f7ee0423baae5a91e3b1dab" }, "downloads": -1, "filename": "runbook-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "4dd8261101dcbdfbcd4df9e13cd46862", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10875, "upload_time": "2019-08-14T02:29:55", "upload_time_iso_8601": "2019-08-14T02:29:55.520301Z", "url": "https://files.pythonhosted.org/packages/af/05/5c4b5e2fe4aa91334ec644e0329c146c7af1a7d20693e0bd53ce23ac5d14/runbook-0.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "ed9f3b6447f78afb7f2f5888f19f4239", "sha256": "c8d7822091bdae7454e81bd284b53a386ed48c021b2f536e232020cffa45709d" }, "downloads": -1, "filename": "runbook-0.1.tar.gz", "has_sig": false, "md5_digest": "ed9f3b6447f78afb7f2f5888f19f4239", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5789, "upload_time": "2019-08-14T02:29:57", "upload_time_iso_8601": "2019-08-14T02:29:57.711427Z", "url": "https://files.pythonhosted.org/packages/38/71/7c90c78f5211e81d2d0fffc3313d9d67f5c57522a461da450b9fd3a505ce/runbook-0.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2": [ { "comment_text": "", "digests": { "md5": "b6ca5c16bbbd84a0d1992588a4b276ef", "sha256": "9fe4f79b5f4df371d8e033b326c73a430d7164f1203190b38e341398fd7d222a" }, "downloads": -1, "filename": "runbook-0.2.tar.gz", "has_sig": false, "md5_digest": "b6ca5c16bbbd84a0d1992588a4b276ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7521, "upload_time": "2019-10-29T04:21:05", "upload_time_iso_8601": "2019-10-29T04:21:05.064029Z", "url": "https://files.pythonhosted.org/packages/b1/d2/83561aa90f11bed58a8f1efcf8fed8db0c76157d5495dbd9241d81dbfcdb/runbook-0.2.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b6ca5c16bbbd84a0d1992588a4b276ef", "sha256": "9fe4f79b5f4df371d8e033b326c73a430d7164f1203190b38e341398fd7d222a" }, "downloads": -1, "filename": "runbook-0.2.tar.gz", "has_sig": false, "md5_digest": "b6ca5c16bbbd84a0d1992588a4b276ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7521, "upload_time": "2019-10-29T04:21:05", "upload_time_iso_8601": "2019-10-29T04:21:05.064029Z", "url": "https://files.pythonhosted.org/packages/b1/d2/83561aa90f11bed58a8f1efcf8fed8db0c76157d5495dbd9241d81dbfcdb/runbook-0.2.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }