{"id":20727562,"url":"https://github.com/flying-sheep/bcode","last_synced_at":"2026-03-05T03:31:24.184Z","repository":{"id":6316711,"uuid":"7551713","full_name":"flying-sheep/bcode","owner":"flying-sheep","description":"bencoding \u0026 -decoding library","archived":false,"fork":false,"pushed_at":"2014-03-24T19:41:33.000Z","size":237,"stargazers_count":26,"open_issues_count":1,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-09-04T20:56:58.651Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://flying-sheep.github.com/bcode/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"aerogear/aerogear-ios-http","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flying-sheep.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":"2013-01-11T00:56:32.000Z","updated_at":"2024-07-21T19:15:00.000Z","dependencies_parsed_at":"2022-07-09T07:16:32.674Z","dependency_job_id":null,"html_url":"https://github.com/flying-sheep/bcode","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/flying-sheep/bcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flying-sheep%2Fbcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flying-sheep%2Fbcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flying-sheep%2Fbcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flying-sheep%2Fbcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flying-sheep","download_url":"https://codeload.github.com/flying-sheep/bcode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flying-sheep%2Fbcode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30108601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T01:39:18.192Z","status":"online","status_checked_at":"2026-03-05T02:00:06.710Z","response_time":93,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-17T04:32:22.470Z","updated_at":"2026-03-05T03:31:24.168Z","avatar_url":"https://github.com/flying-sheep.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"bcoding\n=======\n\nyet another… but mine is fast as hell.\n\ninstall\n-------\n\n.. code-block:: bash\n\n\tpip install bcoding\n\nuse\n---\n\n.. code-block:: python\n\n\tfrom bcoding import bencode, bdecode\n\ndecoding:\n~~~~~~~~~\n\n.. code-block:: python\n\n\t# decoding from binary files or streams:\n\twith open('some.torrent', 'rb') as f:\n\t\ttorrent = bdecode(f)\n\t\tprint(torrent['announce'])\n\n\t# decoding from (byte)strings:\n\tone = bdecode(b'i1e')\n\ttwo = bdecode('3:two')\n\nencoding (note that any iterable or mapping can be bencoded):\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code-block:: python\n\n\t# encoding into binary files or streams:\n\tbencode({'a': 0}, sys.stdout.buffer) # ⇒ d1:ai0ee\n\n\t# encoding to bytestrings:\n\tassert bencode(('a', 0)) == b'l1:ai0ee'\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflying-sheep%2Fbcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflying-sheep%2Fbcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflying-sheep%2Fbcode/lists"}