Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Readme
benparse is a bencode parser for Python 3. It is capable of reading and creating bencoded files such as torrents
json
and pickle
Complete usage documentation and examples are available here
# Load a bencoded file
with open('linux_distro.torrent', 'rb') as file:
torrent_dict = benparse.load(file)
# Make changes
torrent_dict[b'announce'] = b'http://mirror.example.org:6969/announce'
# Save a Python object as a bencoded file
with open('linux_distro.torrent', 'wb') as file:
benparse.dump(torrent_dict, file)
Install from PyPI:
pip3 install benparse
Install from source:
git clone https://gitlab.com/adralioh/benparse.git
pip3 install ./benparse
Tests are run using the built-in unittest
module, and Coverage.py is used to measure code coverage
Run tests without measuring coverage:
python3 -m unittest discover tests
Run tests and measure coverage:
coverage run -m unittest discover tests
View the results:
coverage report
Generate a detailed report, outputted to ./htmlcov
:
coverage html
Sphinx is used to build documentation
Build requirements:
How to build:
cd docs
make html
FAQs
Bencode parser
We found that benparse demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.