{ "info": { "author": "Alessandro Costa", "author_email": "alecosta.me@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "Pytbo: Python Telegram Bots made easy\n=====================================\n\n.. image:: https://img.shields.io/pypi/v/pytbo.svg\n :target: https://pypi.python.org/pypi/pytbo\n\nPytbo is a module aimed at simplifying the creation of `Telegram Bots `_ using Python.\n\nA minimum familiarity with Telegram Bots is required to use this library. Please take a look at the `introduction `_ and the `FAQ `_ before starting.\n\nGetting Started\n---------------\n\nTo start working with Pytbo, you must have a Bot token.\nIf you don't know what we're talking about, read how to `create your first bot with BotFather `_.\n\nThis is a simple _echo_ bot done with Pytbo that looks for updates every 5 seconds.\n\n.. code-block:: python\n\n import pytbo\n import time\n\n # Bot Token received from Telegram\n BOT_TOKEN = \"MY_BOT_TOKEN\"\n # Polling interval in seconds\n INTERVAL = 5\n\n # Create bot object\n bot = pytbo.BareBot(BOT_TOKEN)\n # Print bot information\n print(\"Bot ID......: %s\" % (bot.id))\n print(\"Bot username: %s\" % (bot.username))\n\n # Initialize offset\n offset = 0\n # Infinite polling loop\n while True:\n # Look for updates\n updates = bot.getUpdates(offset)\n # Handle them\n for u in updates:\n if u.message:\n if u.message.text:\n # If the update contains a message\n # that contains text, we reply to the\n # sender with the same text.\n bot.sendMessage(\n u.message.chat.id,\n u.message.text,\n reply_to_message_id=u.message.message_id\n )\n # Update offset to avoid receiving\n # the same update again\n offset = u.update_id + 1\n # Sleep\n time.sleep(INTERVAL)\n\nInstallation\n------------\n\nTo install Pytbo, simply:\n\n.. code-block:: bash\n\n $ pip install pytbo\n\nDocumentation\n-------------\n\nA proper documentation is not yet available, but it will be.\nHowever, useful methods and classes are documented inside the source code.\n\nDon't be afraid to have a look inside, sometimes is the best way to learn.\n\nHow to Contribute\n-----------------\n\n#. Fork this repository on GitHub to start making your changes to the **master** branch (or branch off of it).\n#. Send a pull request.\n\nAknowledgements\n---------------\n\nThanks to `Kenneth Reitz `_ and to all the other developers of the `requests `_ module, which is used inside Pytbo and also as a blueprint for this repository and documentation layout.\n\n\n.. :changelog:\n\nRelease History\n---------------\n\n0.1.0 (2016-04-23)\n++++++++++++++++++\n\n* BareBot class that wraps Telegram Bot APIs methods\n* Types classes that wraps Telegram Bot APIs types\n\n0.0.1 (2016-04-14)\n++++++++++++++++++\n\n* Conception", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kostola/pytbo", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "pytbo", "package_url": "https://pypi.org/project/pytbo/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pytbo/", "project_urls": { "Homepage": "https://github.com/kostola/pytbo" }, "release_url": "https://pypi.org/project/pytbo/0.1.0/", "requires_dist": [ "requests (<3.0.0,>=2.1.0)", "requests-toolbelt (<0.7.0,>=0.6.0)" ], "requires_python": "", "summary": "Python Telegram Bots made easy", "version": "0.1.0" }, "last_serial": 2079737, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "bb6a8d27c5b01ff738b68c375aa32175", "sha256": "199f418b686d921fea9ea1e6e5b10b419f4160eaf899cdad573aa04533d8d5b3" }, "downloads": -1, "filename": "pytbo-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bb6a8d27c5b01ff738b68c375aa32175", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19944, "upload_time": "2016-04-23T08:56:25", "url": "https://files.pythonhosted.org/packages/d0/b4/fab579ee03191a7942440d9387b392a0bcb7835366ac4f3b2406dcb8b44f/pytbo-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4f3834606e23c390ad49d56bffe7f8be", "sha256": "25ae2d68c36693584e3bb41e88487503409940142f650656a2295681880cd2e2" }, "downloads": -1, "filename": "pytbo-0.1.0.tar.gz", "has_sig": false, "md5_digest": "4f3834606e23c390ad49d56bffe7f8be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16715, "upload_time": "2016-04-23T08:57:41", "url": "https://files.pythonhosted.org/packages/94/73/313b5533f8da9f7c6cefe2dfb33736aae37448990007e676b4dd53797396/pytbo-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bb6a8d27c5b01ff738b68c375aa32175", "sha256": "199f418b686d921fea9ea1e6e5b10b419f4160eaf899cdad573aa04533d8d5b3" }, "downloads": -1, "filename": "pytbo-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bb6a8d27c5b01ff738b68c375aa32175", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19944, "upload_time": "2016-04-23T08:56:25", "url": "https://files.pythonhosted.org/packages/d0/b4/fab579ee03191a7942440d9387b392a0bcb7835366ac4f3b2406dcb8b44f/pytbo-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4f3834606e23c390ad49d56bffe7f8be", "sha256": "25ae2d68c36693584e3bb41e88487503409940142f650656a2295681880cd2e2" }, "downloads": -1, "filename": "pytbo-0.1.0.tar.gz", "has_sig": false, "md5_digest": "4f3834606e23c390ad49d56bffe7f8be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16715, "upload_time": "2016-04-23T08:57:41", "url": "https://files.pythonhosted.org/packages/94/73/313b5533f8da9f7c6cefe2dfb33736aae37448990007e676b4dd53797396/pytbo-0.1.0.tar.gz" } ] }