{ "info": { "author": "Davide Depau", "author_email": "davide@depau.eu", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: Communications :: Chat", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# DepyTG\n\nThe only Python3 Telegram bot library that does *nothing*.\n\n### Wait, what?\n\nWell of course it doesn't do *nothing* at all. However, it does nothing compared to many other Telegram bot libraries, and that's a design goal.\n\n### Design goals\n\nThe main goal is to KISS \u2014 Keep It Simple, Stupid.\n\nOther than being simple, DepyTG tries to:\n\n - Have a 1:1 correspondence with Telegram's official API specs. The only documentation you need is Telegram's.\n - Be compatible with any HTTP library you may want to use \u2014 Requests, Flask, JSON+Urllib, anything\n - Make sure 99.9999% of its objects are JSON-serializable\n - Provide a simple (but totally optional) API to do the network stuff\n - Heavily integrate with IDEs that support code insights by type-hinting everything that can be type-hinted\n - Not try to reinvent the wheel. Telegram's API is quite simple, we're not going to implement simplified \"send_message\" methods.\n \n \n # Big note\n \n This is a work in progress! I wrote this from scratch to write my own Telegram bots. I haven't tested it very much. I'll test it as I work on them. I'll write some tests and add CI soon.\n \n \n ### Quick intro\n \n ##### Creating an object\n \n - Manually\n \n ```python\n >>> types.Document(\n file_id='doc_id',\n file_name='ciao.pdf',\n thumb=PhotoSize(\n file_id='thumb_id',\n width=100, \n height=50\n )\n )\n Document({'file_id': 'doc_id', 'thumb': PhotoSize({'file_id': 'thumb_id', 'width': 100, 'height': 50}), 'file_name': 'ciao.pdf'})\n ```\n \n - From dict/JSON\n ```python\n >>> types.Document.from_json({'file_id': 'doc_id',\n 'file_name': 'ciao.pdf', 'thumb': {'file_id': 'thumb_id', 'height': 50, 'width': 100}})\n Document({'file_id': 'doc_id', 'thumb': PhotoSize({'file_id': 'thumb_id', 'width': 100, 'height': 50}), 'file_name': 'ciao.pdf'})\n \n# Notice how the type of \"thumb\" (PhotoSize) is automatically detected.\n ```\n \n #### Calling methods\n \n Methods are regular Python objects. \"Call\" them once to generate the parameters' dictionary, then twice (passing the API token) to actually send the request.\n \n - With the built-in API\n ```python\n # \u2193 Pass fields here \u2193 Pass token here \n >>> methods.setWebhook(\"https://my.super.webhook.com\")(\"my_bot_token\")\n True\n >>> methods.getWebhookInfo()(\"my_bot_token\")\nWebhookInfo({'url': 'https://my.super.webhook.com', 'has_custom_certificate': False, 'pending_update_count': 0})\n ```\n \n - With an external library\n ```python\n # \u2193 Store to variable \u2193 Only pass fields\n >>> method = methods.setWebhook(\"https://my.super.webhook.com\")\n >>> r = requests.post(\"https://api.telegram.org/botmy_bot_token/setWebhook\", json=method)\n >>> method.read_result(r.json())\n True\n \n >>> r = requests.get(\"https://api.telegram.org/botmy_bot_token/getWebhookInfo\")\n # \u2193 \"read_result\" is specific for each method\n >>> methods.getWebhookInfo.read_result(r.json())\n WebhookInfo({'url': 'https://my.super.webhook.com', 'has_custom_certificate': False, 'pending_update_count': 0})\n ```\n \n ##### Note:\n Methods that take `InputFile` objects are a bit special. First of all, any field that takes `InputFile` is made optional, even if Telegram's API references says the opposite.\n \n `InputFile` is the only object that is not JSON-serializable and as such, it needs special handling. If you use a custom HTTP library, you will need to upload the files yourself as described in Telegram's documentation.\n \n The built-in requests API will handle `InputFile` objects automatically and send the fields as `multipart/form-data`. If `requests-toolbelt` is installed it will be used to stream the file.\n \n \n \n ### Possible questions\n \n ##### Why the hell did you define *every* possible object in the API?\n \n Because one of my goals was to have code completion.\n \n All Telegram API objects and methods are children of `TelegramObjectBase`, which is a subclass of `dict`. This means everything (except for `InputFile`) is JSON-serializable and can be used outside of this library.\n \n `dict` has been extended to check field types and to access them with the standard dot notation, so that IDEs like PyCharm can warn you if you do something wrong.\n \n The reason they were \"rewritten\" is to allow for type checking.", "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/Depau/DepyTG", "keywords": "telegram bot development", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "DepyTG", "package_url": "https://pypi.org/project/DepyTG/", "platform": "", "project_url": "https://pypi.org/project/DepyTG/", "project_urls": { "Homepage": "https://github.com/Depau/DepyTG" }, "release_url": "https://pypi.org/project/DepyTG/4.0.0/", "requires_dist": null, "requires_python": ">=3", "summary": "The only Telegram bot library that does nothing", "version": "4.0.0" }, "last_serial": 4255067, "releases": { "3.6.1": [ { "comment_text": "", "digests": { "md5": "c931630074e53100237626bfe11b09d2", "sha256": "387be646e1bc21db7c12a65a6feda36c721955ea8d021b7c8ca8de84c2599aeb" }, "downloads": -1, "filename": "DepyTG-3.6.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c931630074e53100237626bfe11b09d2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3", "size": 36353, "upload_time": "2018-04-24T22:42:28", "url": "https://files.pythonhosted.org/packages/2f/01/aba811ca6034f392d13ed90a97664d22f515d1fa9be173f434b449d53111/DepyTG-3.6.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9f2fed21b135e70d13409b6a2d0c2b67", "sha256": "09d2c542e939734ef8c8a86579f4a048f3120278349e20e71bd571e650447526" }, "downloads": -1, "filename": "DepyTG-3.6.1.tar.gz", "has_sig": false, "md5_digest": "9f2fed21b135e70d13409b6a2d0c2b67", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 36369, "upload_time": "2018-04-24T22:42:03", "url": "https://files.pythonhosted.org/packages/ff/a8/738e88ab8d56334eec1dd904a7e602b020595e6d206dac8360fa5c0974cd/DepyTG-3.6.1.tar.gz" } ], "3.6.1.post0": [ { "comment_text": "", "digests": { "md5": "8f58aecf9aa52980506b46a4eaa7243d", "sha256": "f50a79dd654d55317fe506ee7a2d84221abb3d38b4961084fc1dd8e0ab9909d2" }, "downloads": -1, "filename": "DepyTG-3.6.1.post0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8f58aecf9aa52980506b46a4eaa7243d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3", "size": 36409, "upload_time": "2018-04-25T00:05:04", "url": "https://files.pythonhosted.org/packages/67/f4/911cb52445c250aed37c9d5211a2cfa826691305e05ef6ce7b5764516711/DepyTG-3.6.1.post0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ae41bc4936a4adea66fefcdb4bca32c2", "sha256": "e7050cce97e659a2b7f3c49f7dfb5a3764748030d3e3a6cf04741153a57bcf4b" }, "downloads": -1, "filename": "DepyTG-3.6.1.post0.tar.gz", "has_sig": false, "md5_digest": "ae41bc4936a4adea66fefcdb4bca32c2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 36388, "upload_time": "2018-04-25T00:04:51", "url": "https://files.pythonhosted.org/packages/a1/8b/306e34d2dfa1649d7310496e5678802aa0e72b9669c091163e04ed820beb/DepyTG-3.6.1.post0.tar.gz" } ], "3.6.2": [ { "comment_text": "", "digests": { "md5": "cf14bce1f79bc954ade34a7e7f426309", "sha256": "d5e1c090e1a55433417eb7995c7bcca17501b4bf815d64033bb436091ae90f7d" }, "downloads": -1, "filename": "DepyTG-3.6.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cf14bce1f79bc954ade34a7e7f426309", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3", "size": 36371, "upload_time": "2018-04-25T03:33:18", "url": "https://files.pythonhosted.org/packages/62/48/9563f72d59ffe55d0f1839b4d306eb7b7cf2d4e36ebf9d09fff70b851a04/DepyTG-3.6.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fcc76f903b4902fb021c72304cccfc1e", "sha256": "d587c2bb0720da06769642fd5e5639dbe1c980884912010088b968e587a50987" }, "downloads": -1, "filename": "DepyTG-3.6.2.tar.gz", "has_sig": false, "md5_digest": "fcc76f903b4902fb021c72304cccfc1e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 36375, "upload_time": "2018-04-25T03:33:20", "url": "https://files.pythonhosted.org/packages/c2/ef/65cb2a7f65611d63fb1f00312e8a018311755e5ec746aed093fbd71e9510/DepyTG-3.6.2.tar.gz" } ], "3.6.2.post0": [ { "comment_text": "", "digests": { "md5": "99df93084be353feb818d11703f29f03", "sha256": "96f63846ea1e03d7630d103d2c84bddaec3eb476c430aa856b246ecd7bd2a4a3" }, "downloads": -1, "filename": "DepyTG-3.6.2.post0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "99df93084be353feb818d11703f29f03", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3", "size": 37369, "upload_time": "2018-04-25T04:06:39", "url": "https://files.pythonhosted.org/packages/c5/fa/d27f35de01c9ac62f767b45bc735535432e9a65477d5acc1ac5043f70cca/DepyTG-3.6.2.post0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0c3ef56c40fa75274b8a688df0ca0708", "sha256": "a26bbc6e8450f8d53347fd97b5e0621ee32325e1edb2d404e109fec79dffee6f" }, "downloads": -1, "filename": "DepyTG-3.6.2.post0.tar.gz", "has_sig": false, "md5_digest": "0c3ef56c40fa75274b8a688df0ca0708", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 36935, "upload_time": "2018-04-25T04:06:40", "url": "https://files.pythonhosted.org/packages/fd/5c/41497fbbfa95416b1653836131919fcd4090ff460bcc2f8c8a12927c70f8/DepyTG-3.6.2.post0.tar.gz" } ], "3.6.2.post1": [ { "comment_text": "", "digests": { "md5": "12ab1ae6b179ac244899f7d339c355b0", "sha256": "b286dce7f672e7cb9c0e671afa33cbc6fe7594f0000038319d1627bec235d453" }, "downloads": -1, "filename": "DepyTG-3.6.2.post1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "12ab1ae6b179ac244899f7d339c355b0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3", "size": 37395, "upload_time": "2018-04-25T05:12:36", "url": "https://files.pythonhosted.org/packages/74/42/f171a8035dcafb07cf819198db6166695e8c3a02daa969ab91a7f279bc8f/DepyTG-3.6.2.post1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ae51744eab2ab16dd6614f6c2e299e0b", "sha256": "fbb7f91ea203be40215020e4d49a4bbceadb630761c314d70d971c1f2147cf98" }, "downloads": -1, "filename": "DepyTG-3.6.2.post1.tar.gz", "has_sig": false, "md5_digest": "ae51744eab2ab16dd6614f6c2e299e0b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 36948, "upload_time": "2018-04-25T05:12:37", "url": "https://files.pythonhosted.org/packages/bc/95/edf406625c1cd604d4ea7d88167efaf0e9df8c84f974775e6ed95b2d81ed/DepyTG-3.6.2.post1.tar.gz" } ], "3.6.2.post2": [ { "comment_text": "", "digests": { "md5": "13b01b4ada94311c5bccf747084860b8", "sha256": "a136f6f7f817efb19caae3140fca22699fe72e03d25e2e97e51548f5ac72cfb7" }, "downloads": -1, "filename": "DepyTG-3.6.2.post2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "13b01b4ada94311c5bccf747084860b8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3", "size": 37394, "upload_time": "2018-04-25T05:28:01", "url": "https://files.pythonhosted.org/packages/ba/03/957bfaad23c4a7db0f5621203fde93f2e015ed2cb2e33ac4146ffb04c36b/DepyTG-3.6.2.post2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eaa976e9110bc43fd11a140f4dad2633", "sha256": "793b1e27ca55c409d2568ca22cb4d747d8fae35b06329c258487e8a1263db920" }, "downloads": -1, "filename": "DepyTG-3.6.2.post2.tar.gz", "has_sig": false, "md5_digest": "eaa976e9110bc43fd11a140f4dad2633", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 36935, "upload_time": "2018-04-25T05:28:03", "url": "https://files.pythonhosted.org/packages/7a/87/701cdb1018e22f0b5e943ff9367e018df638b59972ae629a3dd51aef14c2/DepyTG-3.6.2.post2.tar.gz" } ], "3.6.3": [ { "comment_text": "", "digests": { "md5": "8a342cc8c4971098d5a639abd05f6912", "sha256": "62d329a1e8ee09417584f87a996753811a6fac357ccbc0e5211ef300dedb2ff7" }, "downloads": -1, "filename": "DepyTG-3.6.3-py3-none-any.whl", "has_sig": false, "md5_digest": "8a342cc8c4971098d5a639abd05f6912", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 37715, "upload_time": "2018-06-13T12:45:33", "url": "https://files.pythonhosted.org/packages/fc/64/324170ad200ccd34e2181459078fd6133cf2ad513fbf0aeb2cf3d8ad0ca0/DepyTG-3.6.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6b93e6c15130c6567440d76034667cfc", "sha256": "7e1bfd44ac10256b6a197378c2a0893ee59d5ea1433ca8500ced6d6e42510764" }, "downloads": -1, "filename": "DepyTG-3.6.3.tar.gz", "has_sig": false, "md5_digest": "6b93e6c15130c6567440d76034667cfc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 37343, "upload_time": "2018-06-13T12:45:50", "url": "https://files.pythonhosted.org/packages/11/52/1b0d4385874f413a1bb8b79342a62a95623d7e5d58aef49198beaf6fb686/DepyTG-3.6.3.tar.gz" } ], "3.6.3.post0": [ { "comment_text": "", "digests": { "md5": "b77f0ac7d4d464574d80d09cc3007e6d", "sha256": "ecf48ed5a0946694e36c1837f5d54939cc08d09ff953742cfab778f93d556409" }, "downloads": -1, "filename": "DepyTG-3.6.3.post0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b77f0ac7d4d464574d80d09cc3007e6d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3", "size": 37777, "upload_time": "2018-06-24T13:31:48", "url": "https://files.pythonhosted.org/packages/22/51/02e2a46365c3a07ab41fbdf0d9390d82d1669dd0394fef794468ddbdff2f/DepyTG-3.6.3.post0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ccd647478e41d24e5bf381a228917f69", "sha256": "9a917757be6ab679e813b6f52f8579547f66a267183478e5ccccb226f27497e3" }, "downloads": -1, "filename": "DepyTG-3.6.3.post0.tar.gz", "has_sig": false, "md5_digest": "ccd647478e41d24e5bf381a228917f69", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 37348, "upload_time": "2018-06-24T13:31:38", "url": "https://files.pythonhosted.org/packages/f2/0d/cfdb200ef9ad6f8a049018e21a53d0a7cf47b71babaac6707b7ca8f0667e/DepyTG-3.6.3.post0.tar.gz" } ], "3.6.5": [ { "comment_text": "", "digests": { "md5": "ca46d39f4792489f1d9ecd0efa6ace25", "sha256": "cb6dc4fd58557f519476fc49e106f1c7db381a01d344c799c69c12bc8a01074c" }, "downloads": -1, "filename": "DepyTG-3.6.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ca46d39f4792489f1d9ecd0efa6ace25", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3", "size": 38053, "upload_time": "2018-08-11T13:26:35", "url": "https://files.pythonhosted.org/packages/23/a5/594ef62616f841949237c9309595f6ea6d54ab80566c8cb0d3937a8d4637/DepyTG-3.6.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0d725360a3dda8e2ee0f7745b51ae156", "sha256": "e023a10a119041365f23fb2dfc1a50e8c863ee8762a825ef187e8f5f89c0c76f" }, "downloads": -1, "filename": "DepyTG-3.6.5.tar.gz", "has_sig": false, "md5_digest": "0d725360a3dda8e2ee0f7745b51ae156", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 35738, "upload_time": "2018-08-11T13:26:54", "url": "https://files.pythonhosted.org/packages/e8/33/301f4d68223ef09a9ea7d0343ade557e643073798ddb29fee325a3d9e26c/DepyTG-3.6.5.tar.gz" } ], "4.0.0": [ { "comment_text": "", "digests": { "md5": "c4c1dca9d34e2d23fd83e621ec3ca7c8", "sha256": "6c2489c3af28f720ad9dd6dfa0991329fa31ae79b309735b8f6d3e0212f2e1e8" }, "downloads": -1, "filename": "DepyTG-4.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c4c1dca9d34e2d23fd83e621ec3ca7c8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3", "size": 39270, "upload_time": "2018-09-09T21:48:07", "url": "https://files.pythonhosted.org/packages/35/18/72d6fedc0d74f60e2ba199a8ceb6caf8c9941845e2a06eb2a6715fd66aae/DepyTG-4.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d80a13fca86c3bf86acab039f635fef8", "sha256": "f126f7819752b14ef628d0ccf458e962e3b3c682868c300e34ad1f1559f74569" }, "downloads": -1, "filename": "DepyTG-4.0.0.tar.gz", "has_sig": false, "md5_digest": "d80a13fca86c3bf86acab039f635fef8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 36936, "upload_time": "2018-09-09T21:47:48", "url": "https://files.pythonhosted.org/packages/07/f0/6d9a686bff2ea04193c9abf68d620e7404445aa4f5e9e84978605c70e299/DepyTG-4.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c4c1dca9d34e2d23fd83e621ec3ca7c8", "sha256": "6c2489c3af28f720ad9dd6dfa0991329fa31ae79b309735b8f6d3e0212f2e1e8" }, "downloads": -1, "filename": "DepyTG-4.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c4c1dca9d34e2d23fd83e621ec3ca7c8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3", "size": 39270, "upload_time": "2018-09-09T21:48:07", "url": "https://files.pythonhosted.org/packages/35/18/72d6fedc0d74f60e2ba199a8ceb6caf8c9941845e2a06eb2a6715fd66aae/DepyTG-4.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d80a13fca86c3bf86acab039f635fef8", "sha256": "f126f7819752b14ef628d0ccf458e962e3b3c682868c300e34ad1f1559f74569" }, "downloads": -1, "filename": "DepyTG-4.0.0.tar.gz", "has_sig": false, "md5_digest": "d80a13fca86c3bf86acab039f635fef8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 36936, "upload_time": "2018-09-09T21:47:48", "url": "https://files.pythonhosted.org/packages/07/f0/6d9a686bff2ea04193c9abf68d620e7404445aa4f5e9e84978605c70e299/DepyTG-4.0.0.tar.gz" } ] }