{ "info": { "author": "Micha\u0142 G\u00f3ral", "author_email": "dev@mgoral.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: POSIX", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries", "Topic :: System :: Networking", "Topic :: System :: Networking :: Monitoring", "Topic :: System :: Systems Administration" ], "description": "= AnyWebHook\n\nAnyWebhook (*awh*) is Python/WSGI webhook listener and handler. It simplifies\nwriting and acting upon incoming webhooks.\n\nAwh splits webhook handling into _validating_ and _executing_. You must register\nboth validator and executor to handle webhooks. These are simple functions which\naccept a request parameter containing incoming request data. Additionaly they\nreceive a dictionary which is filled with arbitrary data by response manipulator\n(a function decorated with `@app.app` decorator). Many validators and executors\n(for many different webhooks) can be registered. Any validator returning `True`\nmarks webhook as correct.\n\nYou can also affect application's response by registering a separate function\naccepting incoming request and to-be-modified response parameter.\n\nSimple application would look like this:\n\n[[example-app]]\n[source,python]\n----\nimport json\nimport subprocess\n\nfrom awh import Awh\nfrom awh.operate import require, jsonpath\n\napp = Awh()\n\n@app.validator('foo')\ndef valid(request, data_dict):\n payload = request.get_data(as_text=True)\n j = json.loads(payload)\n\n # validate incoming json somehow\n require(jsonpath(j, 'password')[0].value == 'secretpass')\n require(data_dict.get('foo') == 'bar')\n return True\n\n\n@app.executor('foo')\ndef execute(request, data_dict):\n subprocess.call('deploy-app')\n\n\n@app.app\ndef myapp(request, response, data_dict):\n response.status_code = 404\n data_dict['foo'] == 'bar'\n----\n\nFor additional examples, see link:tests/apps[tests/apps].\n\n== Deployment\n\nIn <>, `app` is a WSGI application, which implements its interface\n(i.e. a function accepting `environ` and `start_response` parameters). You\nshould point it to your WSGI server.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/mgoral/awh", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "awh", "package_url": "https://pypi.org/project/awh/", "platform": "linux", "project_url": "https://pypi.org/project/awh/", "project_urls": { "Homepage": "https://gitlab.com/mgoral/awh" }, "release_url": "https://pypi.org/project/awh/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "Webhook creator and deployer", "version": "0.2.1" }, "last_serial": 2629256, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d38031ac0b92aa5504af58687688a343", "sha256": "cf9fc96fd5dd28b9393821222e978a9996a375dd32cf0148d1430d4a48f7f2d2" }, "downloads": -1, "filename": "awh-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d38031ac0b92aa5504af58687688a343", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12185, "upload_time": "2017-02-07T21:55:58", "url": "https://files.pythonhosted.org/packages/7b/1c/fd87119efecb04006294058a4f973b22350ae370edd25fa45000a6a04e18/awh-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "f16fd073a6267781bd8c9fc83d081fe1", "sha256": "8a003ceaa73b6331a45d9ff09415a9515b7287c82817e2abaf75a078b870ac6d" }, "downloads": -1, "filename": "awh-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f16fd073a6267781bd8c9fc83d081fe1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12746, "upload_time": "2017-02-08T20:33:07", "url": "https://files.pythonhosted.org/packages/21/ab/c2f5ad822c2875b7f8c9ecd29de55f1bbf04b239f3457b892f4e0295e6ee/awh-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "156697c6b151c8d340c2624e19ac180c", "sha256": "a9edfb8dc1f557f8daf5bc3084008fb66c5883ae8f1b564770b0bf2a7ba93f6a" }, "downloads": -1, "filename": "awh-0.2.1.tar.gz", "has_sig": false, "md5_digest": "156697c6b151c8d340c2624e19ac180c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12935, "upload_time": "2017-02-08T21:56:35", "url": "https://files.pythonhosted.org/packages/43/e7/ff97713ef8758cca0942ccb68b8966aa50d569b6e73bcd2d5e226ba43128/awh-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "156697c6b151c8d340c2624e19ac180c", "sha256": "a9edfb8dc1f557f8daf5bc3084008fb66c5883ae8f1b564770b0bf2a7ba93f6a" }, "downloads": -1, "filename": "awh-0.2.1.tar.gz", "has_sig": false, "md5_digest": "156697c6b151c8d340c2624e19ac180c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12935, "upload_time": "2017-02-08T21:56:35", "url": "https://files.pythonhosted.org/packages/43/e7/ff97713ef8758cca0942ccb68b8966aa50d569b6e73bcd2d5e226ba43128/awh-0.2.1.tar.gz" } ] }