{ "info": { "author": "Matej Stuchlik", "author_email": "matej.stuchlik@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# Yasuf \u2014 Yet Another Slack, Ummm, Framework\nVery simple way of controlling your Python application via Slack.\n\nYasuf consist of a single, simple decorator that allows you to execute the decorated function via Slack and get it's output back, without modifying the function in any way.\n\nLet's say you have a function `say_hello` that takes a single integer argument, prints out \"Hello!\" that many times and returns string describing how many times it has done so:\n\n```\ndef say_hello(count):\n for i in range(count):\n print(\"Hello!\")\n return \"I've just said Hello! {} times!\".format(count)\n```\n\nControlling this function is as simple as decorating it with the `yasuf.handle` decorator:\n\n\n```\nfrom yasuf import Yasuf\n\nyasuf = Yasuf('slack-token')\n```\n\nYou can get your token [here](https://api.slack.com/docs/oauth-test-tokens).\n\n```\n@yasuf.handle('Say hello ([0-9]+) times!', channel='#general', types=[int])\ndef say_hello(count):\n (...)\n```\n\nThe first argument of `handle` specifies the regexp that the function should respond to, where each capture group corresponds to one argument of the decorated function, `channel` specifies which channel it should be listening to and `types` is a list of functions that will be applied to the captured arguments to convert them from string to whatever the decorated function expects.\n\nNow you can run (or run_async).\n\n```\nyasuf.run()\n```\n\nFrom now on whenever you type `Say hello 3 times!` Yasuf will response with a couple hellos. Or you can ask Yasuf what he knows with the built-in function 'help'.\n\n## Installation\n```python3 -m pip install --user yasuf```\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sYnfo/Yasuf", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "Yasuf", "package_url": "https://pypi.org/project/Yasuf/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Yasuf/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/sYnfo/Yasuf" }, "release_url": "https://pypi.org/project/Yasuf/0.5.dev0/", "requires_dist": null, "requires_python": null, "summary": "Simple framwork for executing python functions via Slack", "version": "0.5.dev0" }, "last_serial": 2042310, "releases": { "0.4.dev0": [ { "comment_text": "", "digests": { "md5": "4372cfcb0a58819101a1a420301f3dc4", "sha256": "a0ae85f5cb2199ec4cd450bd07e580ba241ad4c3375fa28ad9056d09b93f080c" }, "downloads": -1, "filename": "Yasuf-0.4.dev0.tar.gz", "has_sig": false, "md5_digest": "4372cfcb0a58819101a1a420301f3dc4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3714, "upload_time": "2016-04-02T20:53:49", "url": "https://files.pythonhosted.org/packages/b8/2d/9b31946e2c4f068b61d64d9716c854888bea9aafadc9d199d4596f5039c9/Yasuf-0.4.dev0.tar.gz" } ], "0.5.dev0": [ { "comment_text": "", "digests": { "md5": "b976da15cd8deaf8d43a088631b21518", "sha256": "f0fd67638236dec05fa3b8e3f127b10df95e3dd9ee358a3dbdee7461732fd8e7" }, "downloads": -1, "filename": "Yasuf-0.5.dev0.tar.gz", "has_sig": false, "md5_digest": "b976da15cd8deaf8d43a088631b21518", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3710, "upload_time": "2016-04-02T21:01:19", "url": "https://files.pythonhosted.org/packages/18/6d/daad601eff1db12fd9f46b9cc5d8aad88142fe670bacdb1eb519c013048a/Yasuf-0.5.dev0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b976da15cd8deaf8d43a088631b21518", "sha256": "f0fd67638236dec05fa3b8e3f127b10df95e3dd9ee358a3dbdee7461732fd8e7" }, "downloads": -1, "filename": "Yasuf-0.5.dev0.tar.gz", "has_sig": false, "md5_digest": "b976da15cd8deaf8d43a088631b21518", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3710, "upload_time": "2016-04-02T21:01:19", "url": "https://files.pythonhosted.org/packages/18/6d/daad601eff1db12fd9f46b9cc5d8aad88142fe670bacdb1eb519c013048a/Yasuf-0.5.dev0.tar.gz" } ] }