Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
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.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.