{
"info": {
"author": "Marcel Neidinger",
"author_email": "mneiding@cisco.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7"
],
"description": "=============\nWebhookSimple\n=============\n\n\n.. image:: https://img.shields.io/pypi/v/webhooksimple.svg\n :target: https://pypi.python.org/pypi/webhooksimple\n\n.. image:: https://img.shields.io/travis/squ4rks/webhooksimple.svg\n :target: https://travis-ci.org/squ4rks/webhooksimple\n\n.. image:: https://readthedocs.org/projects/webhooksimple/badge/?version=latest\n :target: https://webhooksimple.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n\n.. image:: https://pyup.io/repos/github/squ4rks/webhooksimple/shield.svg\n :target: https://pyup.io/repos/github/squ4rks/webhooksimple/\n :alt: Updates\n\n\n\nA simple framework/cli tool to setup and sync (Webex Teams) API webhooks\n\n\n* Free software: MIT license\n* Documentation: https://webhooksimple.readthedocs.io.\n\n\nFeatures\n--------\n\n* Create, update and delete (webex teams) webhooks from a yaml file\n* Modular architecture makes it suitable for other APIs as well\n\nHow to Use\n----------\n\nWebhookSimple is a simple (and open source) python framework/command line tool that allows you to quickly describe your desired Webex Teams web hooks and then creates or synchronises them for you.\n\nWebhookSimple requires two files from you. *vars.yml* and *hooks.yml*\n\n*vars.yml* specifies the different variables while *hooks.yml* lets you specify the web hooks itself.\n\nA web hook always looks like this (in *hooks.yml*)\n\n.. code-block:: yaml\n\n ---\n hooks:\n - name: test hook 1\n resource: \"messages\"\n event: \"created\"\n target_url: \"https://your_url_here\"\n\nMake sure that the ``name`` of your web hook is always unique since this is what webhookSimple will use to identify and synchronise your webhooks. Your ::vars.yml:: **must include** an *adapter* that specifies the kind of api we are interacting with as well as the authentication details. Leave this to the provided ``parser.WebexTeamsWebhookManager`` for now and add the access token in the correct spot.\n\n*vars.yml*:\n\n.. code-block:: yaml\n\n # vars file. The adapter section **needs** to be here\n adapter:\n name: WebexTeamsWebhookManager\n authentication:\n access_token: your access token here\n parameters:\n\n # Add your variables from here on\n urls:\n - https://www.cisco.com\n - https://www.google.com\n\n\n\nYou can now ``setup``\\ , ``purge``\\ , ``list``\\ , ``export`` or ``sync``\\ your webhooks.\n\n\n* ``setup`` will **delete** all webhooks currently present for this bot and create new ones based on the *hooks.yml* file.\n* ``sync`` will update all existing webhooks based on the ``name``\\ attribute and create those not present. It will **not** delete webhooks that are registered on the server.\n* ``purge``\\ will delete all webhooks without creating new ones\n* ``list``\\ will list all webhooks currently registered\n* ``export`` will save all your currently active webhooks to a .yml file\n\nInvoke the module by running\n\n.. code-block:: bash\n\n $ ls\n hooks.yml vars.yml\n $ python3 -m webhooksimple setup\n\nTaking it one step further\n--------------------------\n\nSetting up web hook from a command line and based of a configuration file is already pretty cool and convenient. But what if we have ten webhooks and need to update the target_url on all of them? We\u2019d have to manually edit all the web hook entries in ::hooks.yml::. This is where the ::vars.yml:: file comes into play. ::hooks.yml:: is not a simple configuration file but rather a `Jinja2 `_ template of a configuration file. What you can do is this:\n\n*vars.yml*\n\n.. code-block:: yaml\n\n ---\n # Note: Adapter part (see above) omited for bravity\n url_prefix: https://my_url_base\n\n*hooks.yml*:\n\n.. code-block:: yaml\n\n ---\n hooks:\n - name: test hook 1\n resource: \"messages\"\n event: \"created\"\n target_url: \"https://{{ url_prefix }}/messages\"\n\nBut this is not all. Those that worked with jinja2 before probably already know what is coming next. You can also add some (generator) logic here. Lets say we want to create a debug and a production version of our web hook. We can do this by doing the following:\n\n*vars.yml*:\n\n.. code-block:: yaml\n\n ---\n # Note: Adapter part (see above) omited for bravity\n envs:\n - name: production\n url: https://my_production_prefix\n - name: development\n url: https://my_development_prefix\n\n*hooks.yml*:\n\n.. code-block:: yaml\n\n ---\n hooks:\n {% for env in envs %}\n - name: {{ env.name }} message hook\n resource: \"message\"\n event: \"created\"\n target_url: {{ env.url }}/messages\n {% endfor %}\n\nOr you want to setup the same web hook for different urls. This would look something like this\n\n*vars.yml*:\n\n.. code-block:: yaml\n\n ---\n # Note: Adapter part (see above) omited for bravity\n urls:\n - https://url_number_1\n - https://url_number_2\n - https://url_number_3\n\n*hooks.yml*:\n\n.. code-block:: yaml\n\n ---\n hooks:\n {% for url in urls %}\n - name: \"hook for {{ url }}\"\n resource: \"message\"\n event: \"created\"\n target_url: {{ url }}\n {% endfor %}\n\nHappy programming! You can get WebhookSimple by running\n\n.. code-block:: bash\n\n $ pip3 install webhooksimple\n\nYou have questions or found a bug? Feel free to hit me up on twitter `@squ4rks `_.\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n=======\nHistory\n=======\n\n0.1.0 (2019-07-12)\n------------------\n\n* First release on PyPI.",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/CiscoSE/webhooksimple",
"keywords": "webhooksimple",
"license": "MIT license",
"maintainer": "",
"maintainer_email": "",
"name": "webhooksimple",
"package_url": "https://pypi.org/project/webhooksimple/",
"platform": "",
"project_url": "https://pypi.org/project/webhooksimple/",
"project_urls": {
"Homepage": "https://github.com/CiscoSE/webhooksimple"
},
"release_url": "https://pypi.org/project/webhooksimple/0.1.2/",
"requires_dist": null,
"requires_python": "",
"summary": "A simple framework/cli tool to setup and sync (Webex Teams) API webhooks",
"version": "0.1.2"
},
"last_serial": 5522524,
"releases": {
"0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "6e6008a2a8603700e3df8813609ad2b2",
"sha256": "b101b2e6377dc7ae12491d2bd64c546ce0eb4973492bc08b80270f93a8138fd8"
},
"downloads": -1,
"filename": "webhooksimple-0.1.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "6e6008a2a8603700e3df8813609ad2b2",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 6387,
"upload_time": "2019-07-12T08:31:58",
"url": "https://files.pythonhosted.org/packages/b9/4c/b806712096b944a62e76f0fd8662fd1557f0e60181b3635e150b9ea0fa59/webhooksimple-0.1.0-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "bf3fefec061a88adf6947b48f1da4324",
"sha256": "c515441963134a1ad83dd6159fdfcb91c85ea1665bffaf7ef091f11b87bc66ac"
},
"downloads": -1,
"filename": "webhooksimple-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "bf3fefec061a88adf6947b48f1da4324",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10743,
"upload_time": "2019-07-12T08:32:01",
"url": "https://files.pythonhosted.org/packages/3c/36/a48b29fa7e0327ea49d9d1642cc3a650da7e4779a1a9a8a1ebb809fde944/webhooksimple-0.1.0.tar.gz"
}
],
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "0e5d2c5e581ad2fbf08e9952ce4f8469",
"sha256": "e74b8035558a9210476f738ca440de0930965f256822409b20083c0e9332a091"
},
"downloads": -1,
"filename": "webhooksimple-0.1.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "0e5d2c5e581ad2fbf08e9952ce4f8469",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 6927,
"upload_time": "2019-07-12T08:59:14",
"url": "https://files.pythonhosted.org/packages/a2/09/0b79ac2fbaef90a4f6dbd2bfceeb5f54457d6ac5d072fef7d20aea733adc/webhooksimple-0.1.1-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "b00dc190f472d55896465e8dcfa31603",
"sha256": "fdb9d733877e4756b913bb2b31da0066816362d6a7ab36b33e19d7a826d9509f"
},
"downloads": -1,
"filename": "webhooksimple-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "b00dc190f472d55896465e8dcfa31603",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11409,
"upload_time": "2019-07-12T08:59:16",
"url": "https://files.pythonhosted.org/packages/00/a5/5c714d3963489aeba3d111f24f58333462a259819d8abc14a5556195525e/webhooksimple-0.1.1.tar.gz"
}
],
"0.1.2": [
{
"comment_text": "",
"digests": {
"md5": "de6d7e67cb4b5040cac22701aba9eec6",
"sha256": "f9e87b2974c0a26fb0b1d184dba0ee2cd5aafdd71664a490752be2eca88451c2"
},
"downloads": -1,
"filename": "webhooksimple-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "de6d7e67cb4b5040cac22701aba9eec6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14954,
"upload_time": "2019-07-12T09:59:10",
"url": "https://files.pythonhosted.org/packages/6c/07/35bd7b53349cfca1f58099cb5c6ed05fedff68588820c3ea62a4c307fbe1/webhooksimple-0.1.2.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "de6d7e67cb4b5040cac22701aba9eec6",
"sha256": "f9e87b2974c0a26fb0b1d184dba0ee2cd5aafdd71664a490752be2eca88451c2"
},
"downloads": -1,
"filename": "webhooksimple-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "de6d7e67cb4b5040cac22701aba9eec6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14954,
"upload_time": "2019-07-12T09:59:10",
"url": "https://files.pythonhosted.org/packages/6c/07/35bd7b53349cfca1f58099cb5c6ed05fedff68588820c3ea62a4c307fbe1/webhooksimple-0.1.2.tar.gz"
}
]
}