{
"info": {
"author": "Thomas Gaigher",
"author_email": "info@pypyr.io",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Libraries :: Python Modules"
],
"description": "###################\npypyr slack plug-in\n###################\n\n.. image:: https://pypyr.io/images/pypyr-logo-small.png\n :alt: pypyr-logo\n :align: left\n\n*pypyr*\n pronounce how you like, but I generally say *piper* as in \"piping down the\n valleys wild\"\n\nSend messages to `slack `__ from pypyr. This is useful for\nsending notifications on success or failure conditions in your pipelines. Or\nfor sending a message just because you can.\n\n`pypyr `__ is a command line interface to\nrun pipelines defined in yaml.\n\n|build-status| |coverage| |pypi|\n\n.. contents::\n\n.. section-numbering::\n\n************\nInstallation\n************\n\npip\n===\n.. code-block:: bash\n\n # pip install --upgrade pypyrslack\n\npypyrslack depends on pypyr-cli. The above ``pip`` will install it for you if\nyou don't have it already.\n\nPython version\n==============\nTested against Python >=3.6\n\n*****\nsteps\n*****\npypyrslack.steps.send\n=====================\nSend a message to slack.\n\nRequired Context\n----------------\n\nRequires the following context items:\n\n- slackToken\n\n - your slack api token. Keep this secure.\n- slackChannel\n\n - send to this slack channel (include # in front)\n- slackText\n\n - the body of your message. Use your usual slack formatting chars.\n\nText substitutions\n------------------\nFor both slackChannel and slackText you can use substitution tokens, aka string\ninterpolation. This substitutes anything between curly braces with the context\nvalue for that key. For example, if your context looked like this:\n\n.. code-block:: yaml\n\n arbitraryValue: pypyrchannel\n arbitraryText: down the\n moreArbText: wild\n slackChannel: \"#{arbitraryValue}\"\n slackText: \"piping {arbitraryText} valleys {moreArbText}\"\n\nThis will result in sending a message to *#pypyrchannel* with text:\n\n*piping down the values wild*\n\nEscape literal curly braces with doubles: {{ for {, }} for }\n\nSee a worked example `for substitutions here\n`__.\n\nSample pipeline\n---------------\nHere is some sample yaml of what a pipeline using the pypyr-slack plug-in\ncould look like:\n\n.. code-block:: yaml\n\n steps:\n - name: pypyrslack.steps.echo\n in:\n echoMe: \"just an arb step that may or may not fail.\"\n - name: pypyrslack.steps.send\n in:\n slackToken: supersecurevaluegoeshere\n slackChannel: \"#channelnamehere\"\n slackText: \"pypyr is busy doing things :construction:\"\n\n # The slackToken and slackChannel have already been set in steps\n # on_success and on_failure are just changing the text for the message.\n on_success:\n - name: pypyrslack.steps.send\n in:\n slackText: \"that went well! :hotdog:\"\n\n on_failure:\n - name: pypyrslack.steps.send\n in:\n slackText: \"whoops! :rage1:\"\n\nIf you saved this yaml as ``./pipelines/hoping-for-a-hotdog.yaml``, you can run\nfrom ./ the following:\n\n.. code-block:: bash\n\n pypyr hoping-for-a-hotdog\n\n\nSee a worked example for `pypyr slack here\n`__.\n\n********************\nslack authentication\n********************\nGet slack api token\n===================\nTo authenticate against your slack, you need to create an api key. There're\nvarious ways of going about this, using legacy tokens, test tokens or a bot.\n\nI generally `create a bot `__. Given\nyou're likely to use it just to send notifications to slack, rather than\nconsume events from slack, it's a pretty simple setup just to get your api key.\n\nRemember to invite and add the bot you create to the slack channel(s) to which\nyou want to post. You invite the bot in like you would a normal user.\n\n\nEnsure secrets stay secret\n==========================\nBe safe! Don't hard-code your api token, don't check it into a public repo.\nHere are some tips for handling api tokens from `slack `__.\n\nDo remember not to fling the api key around as a shell argument - it could\nvery easily leak that way into logs or expose via a ``ps``. I generally use one\nof the pypyr built-in context parsers like *pypyr.parser.jsonfile* or\n*pypyr.parser.yamlfile*, see\n`here for details `__.\n\n*******\nTesting\n*******\nTesting without worrying about dependencies\n===========================================\nRun from tox to test the packaging cycle inside a virtual env, plus run all\ntests:\n\n.. code-block:: bash\n\n # just run tests\n $ tox -e dev -- tests\n # run tests, validate README.rst, run flake8 linter\n $ tox -e stage -- tests\n\nIf tox is taking too long\n=========================\nThe test framework is pytest. If you only want to run tests:\n\n.. code-block:: bash\n\n $ pip install -e .[dev,test]\n\nDay-to-day testing\n==================\n- Tests live under */tests* (surprising, eh?). Mirror the directory structure of\n the code being tested.\n- Prefix a test definition with *test_* - so a unit test looks like\n\n .. code-block:: python\n\n def test_this_should_totally_work():\n\n- To execute tests, from root directory:\n\n .. code-block:: bash\n\n pytest tests\n\n- For a bit more info on running tests:\n\n .. code-block:: bash\n\n pytest --verbose [path]\n\n- To execute a specific test module:\n\n .. code-block:: bash\n\n pytest tests/unit/arb_test_file.py\n\n*****\nHelp!\n*****\nDon't Panic! For help, community or talk, join the chat on |discord|!\n\n**********\nContribute\n**********\nDevelopers\n==========\nFor information on how to help with pypyr, run tests and coverage, please do\ncheck out the `contribution guide `_.\n\nBugs\n====\nWell, you know. No one's perfect. Feel free to `create an issue\n`_.\n\n\n.. |build-status| image:: https://api.shippable.com/projects/58efdfe19755e8070035afd9/badge?branch=master\n :alt: build status\n :target: https://app.shippable.com/github/pypyr/pypyr-slack\n\n.. |coverage| image:: https://api.shippable.com/projects/58efdfe19755e8070035afd9/coverageBadge?branch=master\n :alt: coverage status\n :target: https://app.shippable.com/github/pypyr/pypyr-slack\n\n.. |pypi| image:: https://badge.fury.io/py/pypyrslack.svg\n :alt: pypi version\n :target: https://pypi.python.org/pypi/pypyrslack/\n :align: bottom\n\n.. |discord| replace:: `discord `__\n\n\n",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/pypyr/pypyr-slack",
"keywords": "pypyr slack plugin devops pipeline runner",
"license": "Apache License 2.0",
"maintainer": "",
"maintainer_email": "",
"name": "pypyrslack",
"package_url": "https://pypi.org/project/pypyrslack/",
"platform": "",
"project_url": "https://pypi.org/project/pypyrslack/",
"project_urls": {
"Homepage": "https://github.com/pypyr/pypyr-slack"
},
"release_url": "https://pypi.org/project/pypyrslack/1.0.1/",
"requires_dist": [
"pypyr",
"slackclient",
"bumpversion; extra == 'deploy'",
"twine; extra == 'deploy'",
"check-manifest; extra == 'dev'",
"flake8; extra == 'dev'",
"pytest; extra == 'test'",
"pytest-cov; extra == 'test'",
"tox; extra == 'test'"
],
"requires_python": "",
"summary": "pypyr slack plug-in: send slack messages from pypyr pipelines",
"version": "1.0.1"
},
"last_serial": 5693275,
"releases": {
"0.2.0": [
{
"comment_text": "",
"digests": {
"md5": "fbef4bbd9f3fb08b0a6432292c0c2465",
"sha256": "6483b202156ef5d0eac88254b7e7371f6738079be46e62acfb38d6eb196cbd8f"
},
"downloads": -1,
"filename": "pypyrslack-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fbef4bbd9f3fb08b0a6432292c0c2465",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 10160,
"upload_time": "2017-05-12T18:58:36",
"url": "https://files.pythonhosted.org/packages/f5/73/228b81973aa3d7812aa928547a508373266a63ceed711ed845dff388ccc7/pypyrslack-0.2.0-py3-none-any.whl"
}
],
"0.2.1": [
{
"comment_text": "",
"digests": {
"md5": "bcf7ce84619005621c26650f10e9dce8",
"sha256": "437c5450ad656126341197b005348d30131f0ba7f16b2f2df3ace435f6310910"
},
"downloads": -1,
"filename": "pypyrslack-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bcf7ce84619005621c26650f10e9dce8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 10150,
"upload_time": "2017-05-15T10:48:40",
"url": "https://files.pythonhosted.org/packages/53/cb/48d079fd55da85ddae23dfe5fe819be4d1aac28d8ff909882abba94df95e/pypyrslack-0.2.1-py3-none-any.whl"
}
],
"0.3.0": [
{
"comment_text": "",
"digests": {
"md5": "14ebb8575b0b231acc304ef1135c951b",
"sha256": "b7747a08a3bc4edb974f7eee426bf07c5883c2303e9df07bf418628d98961283"
},
"downloads": -1,
"filename": "pypyrslack-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "14ebb8575b0b231acc304ef1135c951b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 10146,
"upload_time": "2017-05-30T10:00:16",
"url": "https://files.pythonhosted.org/packages/f6/a3/bbcf12f148ea1f413f4e8d831d8a7c27f5defd3b6a63d141e1008d0f8345/pypyrslack-0.3.0-py3-none-any.whl"
}
],
"1.0.0": [
{
"comment_text": "",
"digests": {
"md5": "c90002d7c66c7ef70c7b5ceef327ffa6",
"sha256": "0c85211d557714eae2553be842a79b38b4f315ae5fae947eeeed180562a758a8"
},
"downloads": -1,
"filename": "pypyrslack-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c90002d7c66c7ef70c7b5ceef327ffa6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6391,
"upload_time": "2018-07-26T20:26:29",
"url": "https://files.pythonhosted.org/packages/e7/4c/8e17d151c45310575d6b049880a5f236ac6b1dec681a29b9826d6d9c2bee/pypyrslack-1.0.0-py3-none-any.whl"
}
],
"1.0.1": [
{
"comment_text": "",
"digests": {
"md5": "e21b0b5ef21e4f883a8a676dd99860da",
"sha256": "939c99d96f20ca147aae13fb72ebff0f6af18627e28d1735137929766770d3a7"
},
"downloads": -1,
"filename": "pypyrslack-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e21b0b5ef21e4f883a8a676dd99860da",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6281,
"upload_time": "2019-08-18T03:00:30",
"url": "https://files.pythonhosted.org/packages/7c/46/782e3094d921e8f9f37089077f0558a83a773ab12a6c4cfbdd47160e30de/pypyrslack-1.0.1-py3-none-any.whl"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "e21b0b5ef21e4f883a8a676dd99860da",
"sha256": "939c99d96f20ca147aae13fb72ebff0f6af18627e28d1735137929766770d3a7"
},
"downloads": -1,
"filename": "pypyrslack-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e21b0b5ef21e4f883a8a676dd99860da",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6281,
"upload_time": "2019-08-18T03:00:30",
"url": "https://files.pythonhosted.org/packages/7c/46/782e3094d921e8f9f37089077f0558a83a773ab12a6c4cfbdd47160e30de/pypyrslack-1.0.1-py3-none-any.whl"
}
]
}