{ "info": { "author": "oqwa", "author_email": "oqwa@inbox.lv", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3" ], "description": "GitWebHook\n==========\n\nThis is a simple tool that will help you handle Git webhooks. Now it supports the following services:\n\n* BitBucket\n* GitLab\n\n\nInstallation\n------------\n\n.. code-block:: text\n\n pip install gwh\n\n\nUsage cases\n-----------\n\nIf you want to handle any event from any repository:\n\n.. code-block:: python\n\n from gwh import GitWebhook\n\n gwh = GitWebhook()\n\n @gwh.handle()\n def event():\n print(gwh.event['repository'])\n print(gwh.event['type'])\n print(gwh.event['affected_branches'])\n print(gwh.event['raw_data'])\n\nIf you want to handle push from specific repository:\n\n.. code-block:: python\n\n @gwh.handle(repository=\"user/repo\", types=['push'])\n def event():\n if \"dev\" in gwh.event['affected_branches']:\n print(\"pushed\")\n\nFinally, you need to pass request from your webserver to GitWebhook handler. It will be Flask in this example:\n\n.. code-block:: python\n\n from flask import Flask, request\n\n app = Flask(__name__)\n\n @app.route(\"/\")\n def webhook():\n gwh.handle_request(request.headers, request.data)\n\nFeedback\n--------\n\nBug reports, feature requests, pull requests, any feedback, etc. are welcome.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/oqwa/gwh", "keywords": "git webhook bitbucket gitlab", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "gwh", "package_url": "https://pypi.org/project/gwh/", "platform": "any", "project_url": "https://pypi.org/project/gwh/", "project_urls": { "Homepage": "https://github.com/oqwa/gwh" }, "release_url": "https://pypi.org/project/gwh/0.1.12/", "requires_dist": null, "requires_python": "", "summary": "Tool for handling Git webhooks", "version": "0.1.12" }, "last_serial": 4475527, "releases": { "0.1.12": [ { "comment_text": "", "digests": { "md5": "f4e86884f23d87d7729562fa1b69d41c", "sha256": "84774094ab8024c62154c0e072ba14f785e5dd5139c83810ef96233f8ed5051b" }, "downloads": -1, "filename": "gwh-0.1.12.tar.gz", "has_sig": false, "md5_digest": "f4e86884f23d87d7729562fa1b69d41c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3839, "upload_time": "2018-11-12T00:02:28", "url": "https://files.pythonhosted.org/packages/18/68/6f3b54defdf962f980bdbda72ea694cceac4bab70555b9df354e929860d3/gwh-0.1.12.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f4e86884f23d87d7729562fa1b69d41c", "sha256": "84774094ab8024c62154c0e072ba14f785e5dd5139c83810ef96233f8ed5051b" }, "downloads": -1, "filename": "gwh-0.1.12.tar.gz", "has_sig": false, "md5_digest": "f4e86884f23d87d7729562fa1b69d41c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3839, "upload_time": "2018-11-12T00:02:28", "url": "https://files.pythonhosted.org/packages/18/68/6f3b54defdf962f980bdbda72ea694cceac4bab70555b9df354e929860d3/gwh-0.1.12.tar.gz" } ] }