🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

fast-bencode

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-bencode

Bencode and decode for python

1.1.7
PyPI
Maintainers
1

✨ fast-bencode ✨

The cython version of bencode

pypi python implementation wheel license action

forked from bencode to support latest version of python

  • extra cython extension to speedup
  • typing with mypy check

Usage

from pprint import pprint
from bencode import bdecode, bencode

with open("test.torrent", "rb") as f:
    data = f.read()

raw = bdecode(data)
pprint(raw)

assert bencode(raw) == data
  • There are alias function loads for bdecode and dumps for bencode

build

git clone https://github.com/synodriver/fast-bencode.git
cd fast-bencode
python setup.py build_ext -i

Keywords

bittorrent bencode bdecode

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts