This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Library that encodes/decodes bencode formated strings topython objects.

Project Description

bencode-parser

Bencode parser for python.

For more information about bencode format please refer to wiki_page

INSTALLATION

$ pip install bencode-parser

USAGE

>>> import bencode
>>> bencode.decode('3:abc')
'abc'
>>> bencode.decode('i123e')
123
>>> bencode.decode('li1ei2ei3ee')
[1, 2, 3]
>>> bencode.decode('d1:1i1e1:2i2e1:3i3ee')
{'1': 1, '3': 3, '2': 2}
>>> bencode.encode('abc')
'3:abc'
>>> bencode.encode(123)
'i123e'
>>> bencode.encode([1,2,3])
'li1ei2ei3ee'
>>> bencode.encode({'1': 1, '3': 3, '2': 2})
'd1:1i1e1:3i3e1:2i2ee'
Release History

Release History

This version
History Node

1.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
bencode-parser-1.0.1.macosx-10.11-x86_64.exe (66.1 kB) Copy SHA256 Checksum SHA256 any Windows Installer Jun 6, 2016
bencode-parser-1.0.1.tar.gz (2.7 kB) Copy SHA256 Checksum SHA256 Source Jun 6, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting