{ "info": { "author": "Naim A.", "author_email": "naim@abda.nl", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Asynchronous Telegram Bot\nThis project allows you to create asynchrounous Telegram Bots using Python 3.\n\nAt the moment the API is sparse, feel free to add more methods via Pull Requests or submit Issues.\n\n## Getting Started\n1. Get the source using `git`\n\n ```git clone https://github.com/naim94a/atbot.git```\n\n2. Install using `pip`\n\n ```pip install atbot```\n\n## Example\n```python\nimport os\nimport asyncio\nfrom atbot import TelegramBot, TelegramMessage, ChatAction\n\nAPI_KEY = os.getenv('API_KEY')\n\nasync def handle_message(bot, msg):\n if msg.text == '/start':\n await bot.send_chat_action(msg.chat.id, ChatAction.TYPING)\n await asyncio.sleep(0.2)\n await bot.send_message(msg.chat.id, 'Hello, {0}!'.format(msg.sender.first_name))\n\nasync def my_bot():\n bot = TelegramBot(API_KEY)\n while True:\n updates = await bot.get_updates()\n for update in updates:\n obj = update.get_obj()\n if isinstance(obj, TelegramMessage):\n await handle_message(bot, obj)\n\nasyncio.run(my_bot())\n```", "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/naim94a/atbot", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "atbot", "package_url": "https://pypi.org/project/atbot/", "platform": "", "project_url": "https://pypi.org/project/atbot/", "project_urls": { "Homepage": "https://github.com/naim94a/atbot", "Issues": "https://github.com/naim94a/atbot/issues", "Pull Requests": "https://github.com/naim94a/atbot/pulls" }, "release_url": "https://pypi.org/project/atbot/1.0.0/", "requires_dist": null, "requires_python": ">=3.5.3", "summary": "Asynchronous Telegram Bot API", "version": "1.0.0" }, "last_serial": 4779825, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "21ba70d67a7f4feb520f4295d3db6d8e", "sha256": "4878551fea15038b6f2d8cc3eeafd68a85d25b4e681102d4f27f7f9c519688ae" }, "downloads": -1, "filename": "atbot-1.0.0.tar.gz", "has_sig": false, "md5_digest": "21ba70d67a7f4feb520f4295d3db6d8e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 3794, "upload_time": "2019-02-04T22:25:08", "url": "https://files.pythonhosted.org/packages/00/b5/9002a7dfc5ead8c1c7678d6ad1f80bf2bc7e090369dae03b958efe027d15/atbot-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "21ba70d67a7f4feb520f4295d3db6d8e", "sha256": "4878551fea15038b6f2d8cc3eeafd68a85d25b4e681102d4f27f7f9c519688ae" }, "downloads": -1, "filename": "atbot-1.0.0.tar.gz", "has_sig": false, "md5_digest": "21ba70d67a7f4feb520f4295d3db6d8e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5.3", "size": 3794, "upload_time": "2019-02-04T22:25:08", "url": "https://files.pythonhosted.org/packages/00/b5/9002a7dfc5ead8c1c7678d6ad1f80bf2bc7e090369dae03b958efe027d15/atbot-1.0.0.tar.gz" } ] }