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'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bencode-parser-1.0.1.tar.gz
(2.7 kB
view details)
Built Distribution
File details
Details for the file bencode-parser-1.0.1.tar.gz
.
File metadata
- Download URL: bencode-parser-1.0.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26e9c9fc3aa8cac65056cf39b02b2ef49a8657ed55f49d7ebca42ad1a4073630 |
|
MD5 | abdcf93819b61cfbcb0a249ffbf947bb |
|
BLAKE2b-256 | f3955b900f883c349328600fcb8e33e94c1fb0c7965d25d6a237d8f38c90e4b5 |
File details
Details for the file bencode-parser-1.0.1.macosx-10.11-x86_64.exe
.
File metadata
- Download URL: bencode-parser-1.0.1.macosx-10.11-x86_64.exe
- Upload date:
- Size: 66.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab35a7092dae4c8d7f1faa1dda650108995fcec184fe3f36bb23843b497dd911 |
|
MD5 | d6e4e192912d5b2cbb4ddba3ce2160d3 |
|
BLAKE2b-256 | 5fb9cc267778cb1354d5fa167be6a041bac5717e4cf3245f65b7c24ca00a0898 |