{"id":18100382,"url":"https://github.com/acatton/flatbencode","last_synced_at":"2025-04-13T16:10:05.817Z","repository":{"id":57430916,"uuid":"60967349","full_name":"acatton/flatbencode","owner":"acatton","description":"Fast, safe and non-recursive implementation of Bittorrent bencoding for Python 3","archived":false,"fork":false,"pushed_at":"2022-08-16T19:27:25.000Z","size":26,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T16:09:59.758Z","etag":null,"topics":["bencode","bittorrent","bittorrent-protocol","deserialization","flat","python3","serialization","torrent"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acatton.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-12T12:59:31.000Z","updated_at":"2025-03-27T17:56:02.000Z","dependencies_parsed_at":"2022-08-27T12:40:10.375Z","dependency_job_id":null,"html_url":"https://github.com/acatton/flatbencode","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acatton%2Fflatbencode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acatton%2Fflatbencode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acatton%2Fflatbencode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acatton%2Fflatbencode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acatton","download_url":"https://codeload.github.com/acatton/flatbencode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741202,"owners_count":21154255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bencode","bittorrent","bittorrent-protocol","deserialization","flat","python3","serialization","torrent"],"created_at":"2024-10-31T21:14:00.695Z","updated_at":"2025-04-13T16:10:05.798Z","avatar_url":"https://github.com/acatton.png","language":"Python","readme":"flatbencode\n============\n\n.. image:: https://travis-ci.org/acatton/flatbencode.svg?branch=master\n    :target: https://travis-ci.org/acatton/flatbencode\n\nFast, safe and thoroughly tested implementation of ``bencode`` in pure Python\n3, without any C extension.\n\nThis is called ``flatbencode`` because the algorithm for decoding a ``bencode``\nstructure is non-recursive, thus preventing ``RuntimeException``.\n\n\nUsage\n-----\n\n\n.. code:: python\n\n    \u003e\u003e\u003e from flatbencode import encode, decode\n    \u003e\u003e\u003e encode({b'foo': [b'bar', 1]})\n    b'd3:fool3:bari1eee'\n    \u003e\u003e\u003e decode(b'ldei0e0:e')\n    [OrderedDict(), 0, b'']\n\n\nRun tests\n---------\n\n.. code::\n\n    $ pip install pytest hypothesis\n    $ py.test -v\n\n\nChangelog\n---------\n\nv0.3.0 (not released yet)\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nv0.2.1 (2016-10-22)\n^^^^^^^^^^^^^^^^^^^\n\n* Do not accept strings as dictionary keys [Antoine Catton]\n\nv0.2.0 (2016-10-22)\n^^^^^^^^^^^^^^^^^^^\n\n* Raise an exception when there's still data left. [Tim Ruffing, #2]\n* Use bytes as python dictionary keys (instead of strings) [Tim Ruffing, #2]\n* Sort dictionary keys when serializing (follows the BEP-0003) [Antoine Catton]\n\n\nv0.1.0 (2016-06-12)\n^^^^^^^^^^^^^^^^^^^\n\n* Initial release.\n* Can decode bencoding into a python datastructure.\n* Can encode a python datastructure into bencoding serialization format.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facatton%2Fflatbencode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facatton%2Fflatbencode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facatton%2Fflatbencode/lists"}