{ "info": { "author": "kazimirovic", "author_email": "kazimirovic@protonmail.com", "bugtrack_url": null, "classifiers": [], "description": "Bencode\n======================================\nAn implementation of Bencode encoding in Python 3\n\nUsage\n------------------\n.. code-block:: python\n\n import bencode\n bencode.encode(OrderedDict((1, 2), (b'eggs', b'spam')))\n bencode.decode(b'i3e')\n\n\nType mapping for encoding:\n\n+--------------+--------------+\n| Bencode type | Python type |\n+==============+==============+\n| Dictionary | OrderedDict |\n+--------------+--------------+\n| List | list |\n+--------------+--------------+\n| Byte string | bytes |\n+--------------+--------------+\n| Integer | int |\n+--------------+--------------+\n\nType mapping for decoding:\n\n+--------------+--------------+\n| Python type | Bencode type |\n+==============+==============+\n| dict | Dictionary |\n+--------------+--------------+\n| list or tuple| List |\n+--------------+--------------+\n| bytes | Byte string |\n+--------------+--------------+\n| int | Integer |\n+--------------+--------------+\n\nIf OrderedDict is passed instead of plain dict, the order will be preserved.\n\nCompact peer encoding\n----------------------\nThis package also includes functions for 'compact' peer encoding as per bep 0023. Though not part of bencode itself, compact peer encoding is often used with it. Mainline DHT and most trackers encode peer information in this format.\n\nUsage:\n\n.. code-block:: python\n\n from bencode.misc import pack_compact_peers_list, unpack_compact_peers_list\n\n pack_compact_peers_list((('127.0.0.1', 8080), ('127.0.0.1', 9090)))\n b'\\x7f\\x00\\x00\\x01\\x1f\\x90\\x7f\\x00\\x00\\x01#\\x82'\n\n unpack_compact_peers_list(b'\\x7f\\x00\\x00\\x01\\x1f\\x90\\x7f\\x00\\x00\\x01#\\x82')\n (('127.0.0.1', 8080), ('127.0.0.1', 9090))", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kazimirovic/bencode", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "torrent-bencode", "package_url": "https://pypi.org/project/torrent-bencode/", "platform": "", "project_url": "https://pypi.org/project/torrent-bencode/", "project_urls": { "Homepage": "https://github.com/kazimirovic/bencode" }, "release_url": "https://pypi.org/project/torrent-bencode/0.2/", "requires_dist": null, "requires_python": "", "summary": "An implementation of Bencode encoding in Python 3", "version": "0.2" }, "last_serial": 4860730, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "7aaf493d36e93c129422b8690482f114", "sha256": "59e7a6159c69e2ffee2cb0c8fcc0a4e98d866750f889e250c335fc5323e78cf7" }, "downloads": -1, "filename": "torrent-bencode-0.1.tar.gz", "has_sig": false, "md5_digest": "7aaf493d36e93c129422b8690482f114", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2366, "upload_time": "2019-02-23T06:26:25", "url": "https://files.pythonhosted.org/packages/45/d7/e24446b488be9b3a1e363a1937124c5715fe10dd64c6b56a68cf680c2b3f/torrent-bencode-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "f3b1092af74415ffdd9492b25fb85123", "sha256": "bd04f8116776271ba007e151418276301226fb6978284bc0e20f4c55d784ca10" }, "downloads": -1, "filename": "torrent-bencode-0.2.tar.gz", "has_sig": false, "md5_digest": "f3b1092af74415ffdd9492b25fb85123", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2893, "upload_time": "2019-02-24T11:55:34", "url": "https://files.pythonhosted.org/packages/de/de/9c6b868a63c0fca362bfa47a345c5161d2b6d2f3bf450d9862a66bd6885a/torrent-bencode-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f3b1092af74415ffdd9492b25fb85123", "sha256": "bd04f8116776271ba007e151418276301226fb6978284bc0e20f4c55d784ca10" }, "downloads": -1, "filename": "torrent-bencode-0.2.tar.gz", "has_sig": false, "md5_digest": "f3b1092af74415ffdd9492b25fb85123", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2893, "upload_time": "2019-02-24T11:55:34", "url": "https://files.pythonhosted.org/packages/de/de/9c6b868a63c0fca362bfa47a345c5161d2b6d2f3bf450d9862a66bd6885a/torrent-bencode-0.2.tar.gz" } ] }