{ "info": { "author": "David Dale", "author_email": "dale.david@mail.ru", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# tgalice\n[![PyPI version](https://badge.fury.io/py/tgalice.svg)](https://badge.fury.io/py/tgalice)\n\nThis is yet another common Python wrapper for Telegram bots[*](#footnote1), Alice skills, \nand Facebook Messenger bots.\n\nCurrently, it provides:\n- An (almost) unified interface between your bot and Alice/Telegram/Facebook: `DialogConnector`\n- A number of simple dialogue constructors: `BaseDialogManager` and its flavors, including:\n - a simple FAQ dialog manager\n - a simple form-filling dialog manager\n- A wrapper for storing dialogue state: `BaseStorage` and its flavors (specifially, `MongoBasedStorage`)\n- Yet another wrapper for serving your bot as a Flask application\n\nThis [package](https://pypi.org/project/tgalice/) may be installed with `pip install tgalice`\n\nTo create your own bot, you need either to write a config for an existing dialog manager, \nor to inherit your own dialog manager from `BaseDialogManager`. \n\nThe components of `tgalice` may be combined into a working app as follows:\n```python\nimport tgalice\n\nclass EchoDialogManager(tgalice.dialog_manager.BaseDialogManager):\n def respond(self, ctx: tgalice.dialog.Context):\n return tgalice.dialog.Response(text=ctx.message_text)\n\nconnector = tgalice.dialog_connector.DialogConnector(\n dialog_manager=EchoDialogManager(), \n storage=tgalice.session_storage.BaseStorage()\n)\nserver = tgalice.flask_server.FlaskServer(connector=connector)\n\nif __name__ == '__main__':\n server.parse_args_and_run()\n```\nNow, if your app is hosted on address `{BASE_URL}`, then webhooks for Alice and Facebook will be available, \nrespectively, at `{BASE_URL}/alice/` and `{BASE_URL}/fb/` (and you can reconfigure it, if you want). \nThe webhook for Telegram will be set automatically, if you set the `TOKEN` environment variable to the token \ngiven to you by the [@BotFather](https://t.me/BotFather).\n\nIf you want to test your app locally, you can run it with command line args:\n* `--cli` - to read and type messages in command line, completely offline\n* `--poll` - to run a Telegram bot locally, in long polling mode (in some countries, you need a VPN to do this)\n* `--ngrok` - to run the bot locally, using the [ngrok](https://ngrok.com/) tool[**](#footnote2) \nto create a tunnel from your machine into the internet. This is probably the simplest way to test Alice skills \nwithout deploying them anywhere .\n\nThe [examples](https://github.com/avidale/tgalice/tree/master/examples) directory contains more detailed examples \nof how to create dialogs and serve the bot. \n\n* The Telegram wrapper is based on the \n[pyTelegramBotAPI](https://github.com/eternnoir/pyTelegramBotAPI) package.\n\n** The ngrok connector was taken from the\n[flask-ngrok](https://github.com/gstaff/flask-ngrok) library. It will be refactored to a dependency, \nas soon as the library is updated on PyPI.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/avidale/tgalice", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "tgalice", "package_url": "https://pypi.org/project/tgalice/", "platform": "", "project_url": "https://pypi.org/project/tgalice/", "project_urls": { "Homepage": "https://github.com/avidale/tgalice" }, "release_url": "https://pypi.org/project/tgalice/0.2.3/", "requires_dist": null, "requires_python": "", "summary": "Yet another common wrapper for Alice skills and Facebook/Telegram bots", "version": "0.2.3" }, "last_serial": 5914340, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "481efa6fd185749bceec9728d4e83aaa", "sha256": "6b91818c75e0277e7880e12df5b1df59a8d153261a6ae4448745100f6f875093" }, "downloads": -1, "filename": "tgalice-0.0.1.tar.gz", "has_sig": false, "md5_digest": "481efa6fd185749bceec9728d4e83aaa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3443, "upload_time": "2019-05-26T20:14:31", "url": "https://files.pythonhosted.org/packages/32/a6/0393b10b3b59a073beaffcc63346b6c505636e8ea55b7312d4db69765264/tgalice-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "329253ef9e3fcfe50ca492370cfffb50", "sha256": "6e0a22d4c4cf868083f5ce46284b98c802f79d92e2d98804818f165627f35913" }, "downloads": -1, "filename": "tgalice-0.0.2.tar.gz", "has_sig": false, "md5_digest": "329253ef9e3fcfe50ca492370cfffb50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4212, "upload_time": "2019-05-26T21:29:44", "url": "https://files.pythonhosted.org/packages/57/1d/e2396f25ede609fe4bde08b7a273d48b0dd812ec4cb969e986106ce5ec48/tgalice-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "5d605f087590161054f260e612e5f9bb", "sha256": "d300fd1bcd4f9d918f22dd0400538249328a709f3abb4372edaa28f87bd777ec" }, "downloads": -1, "filename": "tgalice-0.0.3.tar.gz", "has_sig": false, "md5_digest": "5d605f087590161054f260e612e5f9bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4987, "upload_time": "2019-06-10T17:23:11", "url": "https://files.pythonhosted.org/packages/dc/7a/9bfba17aa17cbefc2aed003f1f6be3c5278ee5e88d8ffa3ccfdbbea0e2c5/tgalice-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "fbf0b2f340b137d2d2b854af23acc80d", "sha256": "d386cf42f5aa3ad634cce5727d54c51628a3e547b7a4783af7b48123f08bd06c" }, "downloads": -1, "filename": "tgalice-0.0.4.tar.gz", "has_sig": false, "md5_digest": "fbf0b2f340b137d2d2b854af23acc80d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5002, "upload_time": "2019-06-10T18:45:59", "url": "https://files.pythonhosted.org/packages/ce/d0/e8649ddc630d314c10a727ee70c345c84f8cd39c5ecd94d920c11b88508f/tgalice-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "2a7b90937bf5d6c771ec776b0a556089", "sha256": "a74d791f65b365994c044f9ef32a085a3c56d505244c7d07b85d18a95fbc79ae" }, "downloads": -1, "filename": "tgalice-0.0.5.tar.gz", "has_sig": false, "md5_digest": "2a7b90937bf5d6c771ec776b0a556089", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10309, "upload_time": "2019-06-10T19:05:10", "url": "https://files.pythonhosted.org/packages/a2/32/4fe3c0c78138a84466f1f241eead2fd714db2cda3718a7582672f2f7b61a/tgalice-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "5391d6746f2762253ab91fc6d28a0ced", "sha256": "0eb95b7c8a58e1f6280651e41cf14e7b054d033f6544561a3a30332a14e7b395" }, "downloads": -1, "filename": "tgalice-0.0.6.tar.gz", "has_sig": false, "md5_digest": "5391d6746f2762253ab91fc6d28a0ced", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10330, "upload_time": "2019-06-10T19:08:14", "url": "https://files.pythonhosted.org/packages/0d/19/8d77ed58f611e8308e83559b7cfb6175729644a73bc8322d87b0376c998f/tgalice-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "7de9e21f6ded116f6c1241a9a147c91e", "sha256": "197cef2b51d10e007f291a7f56523d810e8d4475043d6d1c5abea824cda520ad" }, "downloads": -1, "filename": "tgalice-0.0.7.tar.gz", "has_sig": false, "md5_digest": "7de9e21f6ded116f6c1241a9a147c91e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11051, "upload_time": "2019-06-25T06:59:50", "url": "https://files.pythonhosted.org/packages/f4/ec/3dc8f7cdf25e55e894774530e79baf595aaef738c677882fd74732e97ba9/tgalice-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "5b6d2847240f9fbce5132e716549402c", "sha256": "3401cff9908920e2ee1727b5e1f5879186e021258bed175f8b04d98377b918a5" }, "downloads": -1, "filename": "tgalice-0.0.8.tar.gz", "has_sig": false, "md5_digest": "5b6d2847240f9fbce5132e716549402c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11266, "upload_time": "2019-06-29T12:36:22", "url": "https://files.pythonhosted.org/packages/2a/a2/b3b420830eb1e0afb1d6a9c192e12ce802bd4a107a4bdbf793f82c4ee20a/tgalice-0.0.8.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "84480e5e80785ca8d7bfa34a1f4a1a75", "sha256": "39dc718123a4b7870691f0a52c2a07d5077462ff786012f0d8133d07b3ec4df6" }, "downloads": -1, "filename": "tgalice-0.1.0.tar.gz", "has_sig": false, "md5_digest": "84480e5e80785ca8d7bfa34a1f4a1a75", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11525, "upload_time": "2019-07-31T22:14:18", "url": "https://files.pythonhosted.org/packages/f5/32/42214705859f58545075937947f7d287ecfb7d6e182c48bd097fd16e9eae/tgalice-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "3348dea2456387eacdbf4189df8d0673", "sha256": "0a65ced39d89d844127b8ecd7d8cfebd3cad0d13091e0d3da1eb4d088d134a6f" }, "downloads": -1, "filename": "tgalice-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3348dea2456387eacdbf4189df8d0673", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12124, "upload_time": "2019-07-31T22:25:07", "url": "https://files.pythonhosted.org/packages/2f/34/c280426e3d051f1bf235caa0e129f9a63fdea1ae376d062e8f162b8e74e8/tgalice-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "fa0953b9863743d4e062aa7c02b43595", "sha256": "b08d0a1058f5f073a2a9adf06842ff9a50f2525e3b42fe0f309837f01f435200" }, "downloads": -1, "filename": "tgalice-0.1.2.tar.gz", "has_sig": false, "md5_digest": "fa0953b9863743d4e062aa7c02b43595", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13635, "upload_time": "2019-08-04T13:33:34", "url": "https://files.pythonhosted.org/packages/a2/83/3cc797fba4e2f74a20211ac35edb904caf0e8cc7980afde30bbb958c2f58/tgalice-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "0c60d5a642bc94a016b1e0533565e32b", "sha256": "c1eaf55fdb9af9388173f78cf0b5cac8ab62ab2202913ee64802ac652d9b6019" }, "downloads": -1, "filename": "tgalice-0.1.3.tar.gz", "has_sig": false, "md5_digest": "0c60d5a642bc94a016b1e0533565e32b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13984, "upload_time": "2019-08-04T16:08:38", "url": "https://files.pythonhosted.org/packages/fd/83/58242a19a234fed1856076215a70b24215acff4ab2c9b01a9edaad528066/tgalice-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "7291e87dae676e75a74047a3ce3d84b1", "sha256": "829f402ff5fb8060018b941586e86bfeb8e79d6eb27f0cc9910c509d5c8ca3a6" }, "downloads": -1, "filename": "tgalice-0.1.4.tar.gz", "has_sig": false, "md5_digest": "7291e87dae676e75a74047a3ce3d84b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14846, "upload_time": "2019-08-05T19:45:59", "url": "https://files.pythonhosted.org/packages/a9/a3/99105e0989b062a50172cc7936f76cc9147f8c1dd3ea2fffdb2cdf584627/tgalice-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "e05ce389b63732f17f91218d74c3794e", "sha256": "073b89eec0504c2ac0bb5673c13e1688130e092ffa194994b3dd6ae6a214dd66" }, "downloads": -1, "filename": "tgalice-0.1.5.tar.gz", "has_sig": false, "md5_digest": "e05ce389b63732f17f91218d74c3794e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14892, "upload_time": "2019-08-05T21:18:57", "url": "https://files.pythonhosted.org/packages/87/d2/01f28e737395b1430d1c7cc759ed0344be2876a7f6b74ab3eae5c1ea6ad2/tgalice-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "926b20b9382dac75e196814f741a3f8e", "sha256": "49eae15a9fc87cc7b145092767e7afb23676eff6474c8109dbbb2ed6acc3d690" }, "downloads": -1, "filename": "tgalice-0.1.6.tar.gz", "has_sig": false, "md5_digest": "926b20b9382dac75e196814f741a3f8e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20820, "upload_time": "2019-09-03T01:34:04", "url": "https://files.pythonhosted.org/packages/56/75/2a44c135e5fc03c18e7e89bdbae1055542f4fbfdb8a8be12ae4ede7af647/tgalice-0.1.6.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "88a604dba2d73c15ecf677f713fc05d4", "sha256": "0132873a724e3ce9b696fb501288dce79197511551b96d9fa8bb663dfcfccaff" }, "downloads": -1, "filename": "tgalice-0.2.0.tar.gz", "has_sig": false, "md5_digest": "88a604dba2d73c15ecf677f713fc05d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22968, "upload_time": "2019-09-04T21:49:56", "url": "https://files.pythonhosted.org/packages/8c/4b/f8e7782aed1266c1f2d3cca108740632f3a596934bfe1ca5f2e17fa4940b/tgalice-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "09e8c34f94d2d5033c6e844b471dc99d", "sha256": "6bc3f41501939d13bf2ed35fa1dff37d21480d484542ae3106d6f260c07dd1c7" }, "downloads": -1, "filename": "tgalice-0.2.1.tar.gz", "has_sig": false, "md5_digest": "09e8c34f94d2d5033c6e844b471dc99d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26603, "upload_time": "2019-09-14T18:25:08", "url": "https://files.pythonhosted.org/packages/e6/03/6f3af7ab1643425dd2bba508cf97d358d2631d4fe0b562921fb5e56c6373/tgalice-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "bb2ed20ce9613f09da81bd3123d62dba", "sha256": "850601515fccbcec9240afb958a8c5bd05e31f91b43590cfc682a60e19a39958" }, "downloads": -1, "filename": "tgalice-0.2.2.tar.gz", "has_sig": false, "md5_digest": "bb2ed20ce9613f09da81bd3123d62dba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27202, "upload_time": "2019-09-15T11:57:16", "url": "https://files.pythonhosted.org/packages/60/2b/c4e4e07fa28ace0289e9b58fbb294285fede715dd2ee84a3b0db98ef0e15/tgalice-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "8b34d339a4c074ffcc1baa1389bbd025", "sha256": "1c606e8f737f8716d46dc6277c7e8dffb4c7213554e4dc62f85effe1a3ba174b" }, "downloads": -1, "filename": "tgalice-0.2.3.tar.gz", "has_sig": false, "md5_digest": "8b34d339a4c074ffcc1baa1389bbd025", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27162, "upload_time": "2019-10-01T19:21:06", "url": "https://files.pythonhosted.org/packages/a8/44/98106e3ffe02d2fd244bb5100e31b85280cd2bd0e6fc0c1a9dfbec7adfda/tgalice-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8b34d339a4c074ffcc1baa1389bbd025", "sha256": "1c606e8f737f8716d46dc6277c7e8dffb4c7213554e4dc62f85effe1a3ba174b" }, "downloads": -1, "filename": "tgalice-0.2.3.tar.gz", "has_sig": false, "md5_digest": "8b34d339a4c074ffcc1baa1389bbd025", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27162, "upload_time": "2019-10-01T19:21:06", "url": "https://files.pythonhosted.org/packages/a8/44/98106e3ffe02d2fd244bb5100e31b85280cd2bd0e6fc0c1a9dfbec7adfda/tgalice-0.2.3.tar.gz" } ] }