{ "info": { "author": "Oliver Tso", "author_email": "olivertsor@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Application Frameworks" ], "description": "# Poebot\n\n[![PyPI version](https://badge.fury.io/py/poebot.svg)](https://badge.fury.io/py/poebot)\n[![Build Status](https://travis-ci.com/olivertso/poebot.svg?branch=master)](https://travis-ci.com/olivertso/poebot)\n[![Coverage Status](https://coveralls.io/repos/github/olivertso/poebot/badge.svg?branch=master)](https://coveralls.io/github/olivertso/poebot?branch=master)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\nPoebot is a Python library for building [GitHub apps][gh-apps]. Inspired by [Probot][probot] and\npowered by [Starlette][starlette].\n\n## Requirements\n\nPython 3.6+\n\n## Installation\n\n```\npip install poebot\n```\n\nYou'll also need to install an ASGI server, such as [uvicorn][uvicorn]:\n```\npip install uvicorn\n```\n\n## Environment variables\n\n### Required\n\n- `GITHUB_APP_IDENTIFIER`\n- `GITHUB_PRIVATE_KEY`\n- `GITHUB_WEBHOOK_SECRET`\n\n### Optional\n\n- `GITHUB_PRIVATE_KEY_BASE64` (default: `False`)\\\nDocker doesn't support multiline variables in `.env` file. So if you are using them together, you\ncan set this variable to `True` and set `GITHUB_PRIVATE_KEY` to the base64 encoded version of your\nprivate key.\n- `GITHUB_WEBHOOK_ROUTE` (default: `/`)\n\n## Usage\n\nCreate a file `main.py` with the following code:\n```python\nfrom poebot import Poebot\n\napp = Poebot(debug=True)\n\n@app.on_gh_event(\"issues\", \"opened\")\nasync def add_bug_label(github, payload):\n repo = github.get_repo(payload[\"repository\"][\"full_name\"])\n issue = repo.get_issue(payload[\"issue\"][\"number\"])\n issue.add_to_labels(\"bug\")\n```\n\nThen, in your terminal, run:\n```\nuvicorn main:app --host 0.0.0.0 --port 8000 --reload\n```\n\nThe `Poebot` class provides:\n\n- a webhook that listens to GitHub events and verifies the incoming webhook signature;\n- a decorator `on_gh_event` for you to register GitHub event handlers.\n\nThe `on_gh_event` decorator has two parameters: the **event type** and **action** (can be `None`)\nto listen to.\n\nThe event handler receives two arguments:\n- an authenticated `Github` object (from [PyGithub][pygithub]) to interact with GitHub API;\n- the event payload as a dictionary.\n\n## Release\n\n- [ ] Checkout to `master` branch.\n- [ ] Pull changes.\n- [ ] Checkout to a new branch `release/x.x.x`.\n- [ ] Bump version in `setup.py`.\n- [ ] Update `CHANGELOG.md`.\n - [ ] Add a blank line and `## [x.x.x] - YYYY-MM-DD` bellow `## [Unreleased]`.\n - [ ] Update compare links at the bottom section.\n- [ ] Commit with message `Release x.x.x` and push.\n- [ ] Open and merge a PR with title `Release x.x.x`.\n- [ ] Delete branch `release/x.x.x`.\n- [ ] Checkout to `master` branch.\n- [ ] Pull changes.\n- [ ] Create a tag `x.x.x`.\n- [ ] Push the tag.\n- [ ] Create a release with title `x.x.x`.\n - [ ] Copy and paste the newest section from `CHANGELOG.md` to the release description.\n\n[gh-apps]: https://developer.github.com/apps/\n[probot]: https://github.com/probot/probot\n[pygithub]: https://github.com/PyGithub/PyGithub\n[starlette]: https://github.com/encode/starlette\n[uvicorn]: https://github.com/encode/uvicorn\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/olivertso/poebot", "keywords": "async github-app github-bot probot", "license": "", "maintainer": "", "maintainer_email": "", "name": "poebot", "package_url": "https://pypi.org/project/poebot/", "platform": "", "project_url": "https://pypi.org/project/poebot/", "project_urls": { "Homepage": "https://github.com/olivertso/poebot" }, "release_url": "https://pypi.org/project/poebot/0.2.2/", "requires_dist": [ "cryptography (>=2.7)", "PyGithub (>=1.43.8)", "starlette (>=0.12.8)" ], "requires_python": ">=3.6", "summary": "A library for building GitHub apps.", "version": "0.2.2" }, "last_serial": 5727070, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "68f11dbc2a64bef86396217ce3ea383c", "sha256": "1f11aa63d7e35377dd7a097784b9ea08774992a9e9b0cbc0b18fef61ce83ac88" }, "downloads": -1, "filename": "poebot-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "68f11dbc2a64bef86396217ce3ea383c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3024, "upload_time": "2019-08-23T02:07:44", "url": "https://files.pythonhosted.org/packages/c5/aa/e34133d34c08d6b905a6500e4cfad08a4b4e112c7b8a29dc5028daea624f/poebot-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ba6a356327ef4fb5245eb1148d5d0d16", "sha256": "95fb4cac5cc2c2be03f2925a2b9514bc0e1fd5a513e700bccc28129bba0f5e54" }, "downloads": -1, "filename": "poebot-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ba6a356327ef4fb5245eb1148d5d0d16", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2605, "upload_time": "2019-08-23T02:07:46", "url": "https://files.pythonhosted.org/packages/ed/5c/5aeba525331b1c0cf2ae1b3134612337453e2deb529572b5557d674334da/poebot-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b5f773dd9c81b4fe2be2ab88dc244fbb", "sha256": "889d02a6bd6cedfe64e5a7e18e485dbfdca711c563558e423623eccd068a377f" }, "downloads": -1, "filename": "poebot-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b5f773dd9c81b4fe2be2ab88dc244fbb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3835, "upload_time": "2019-08-23T02:45:50", "url": "https://files.pythonhosted.org/packages/df/5b/5ca47d2cb42befeb8d9f8be242f9d31f2d8a6c5a3cbcba6b098898fc91df/poebot-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ed00062cdfb2d11d9fa4abc5f65bbcf6", "sha256": "1b5e08d48d0bb7e34b68863056d09183e26897eb5fca12e21664be40751495b0" }, "downloads": -1, "filename": "poebot-0.1.2.tar.gz", "has_sig": false, "md5_digest": "ed00062cdfb2d11d9fa4abc5f65bbcf6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3304, "upload_time": "2019-08-23T02:45:51", "url": "https://files.pythonhosted.org/packages/8d/62/dd869fbcac8ae705eb74015fcc4bfed54c880eb606d35fadd2a1b620847b/poebot-0.1.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "a597b71902e655c09d45ec3cfc1223c1", "sha256": "b4538d4936e826cfc96c04c713fe6dec5ee4edd41aa330bd2b53550e5eac9f62" }, "downloads": -1, "filename": "poebot-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "a597b71902e655c09d45ec3cfc1223c1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4776, "upload_time": "2019-08-24T19:33:23", "url": "https://files.pythonhosted.org/packages/ed/3b/4b2c45e5f5ea884492e7de082792c0a9be0fbefb8a26b7501e41088cca04/poebot-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "17dba97713a0ab5908b47ae596831226", "sha256": "9d44ec1fa5c4f04c3884a42fbc70a805dcc3373b9585defe4476897844c1528a" }, "downloads": -1, "filename": "poebot-0.2.1.tar.gz", "has_sig": false, "md5_digest": "17dba97713a0ab5908b47ae596831226", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 4424, "upload_time": "2019-08-24T19:33:24", "url": "https://files.pythonhosted.org/packages/85/c3/92b26cfb3538d56f70b84e94f50725af59f1c16a47aaebcded26ac4b5711/poebot-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "81bb6e688d7e5b5626a99b6a5508e38b", "sha256": "2b15f93277b8bdfb56a9a3952b5cb415ff29da82fd08788a10e301d887c00500" }, "downloads": -1, "filename": "poebot-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "81bb6e688d7e5b5626a99b6a5508e38b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4794, "upload_time": "2019-08-25T13:36:59", "url": "https://files.pythonhosted.org/packages/6d/9a/c0aa1a48859589cbb2442e47df2f0ddf45f692a10863927af4736c7e00f6/poebot-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b19a362ba0228882e784107b47b18a9e", "sha256": "1bdf3f4484f46b48f40a119b42cbf7fa8f71c1f449f56203893aa8991ab36cb9" }, "downloads": -1, "filename": "poebot-0.2.2.tar.gz", "has_sig": false, "md5_digest": "b19a362ba0228882e784107b47b18a9e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 4442, "upload_time": "2019-08-25T13:37:00", "url": "https://files.pythonhosted.org/packages/05/3c/c9458cddeab306e41de39e6672b4f8c9449745b58988fb45de8a6ee2863b/poebot-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "81bb6e688d7e5b5626a99b6a5508e38b", "sha256": "2b15f93277b8bdfb56a9a3952b5cb415ff29da82fd08788a10e301d887c00500" }, "downloads": -1, "filename": "poebot-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "81bb6e688d7e5b5626a99b6a5508e38b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4794, "upload_time": "2019-08-25T13:36:59", "url": "https://files.pythonhosted.org/packages/6d/9a/c0aa1a48859589cbb2442e47df2f0ddf45f692a10863927af4736c7e00f6/poebot-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b19a362ba0228882e784107b47b18a9e", "sha256": "1bdf3f4484f46b48f40a119b42cbf7fa8f71c1f449f56203893aa8991ab36cb9" }, "downloads": -1, "filename": "poebot-0.2.2.tar.gz", "has_sig": false, "md5_digest": "b19a362ba0228882e784107b47b18a9e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 4442, "upload_time": "2019-08-25T13:37:00", "url": "https://files.pythonhosted.org/packages/05/3c/c9458cddeab306e41de39e6672b4f8c9449745b58988fb45de8a6ee2863b/poebot-0.2.2.tar.gz" } ] }