Protobuf Decoder
Simple protobuf decoder for python
Motivation
The goal of this project is decode protobuf binary without proto files
Installation
Install using pip
pip install protobuf-decoder
Simple Examples
"""
# proto
message Test1 {
string a = 1;
}
# message
{
"a": "테스트"
}
# binary
0A 09 ED 85 8C EC 8A A4 ED 8A B8
"""
test_target = "0A 09 ED 85 8C EC 8A A4 ED 8A B8"
parsed_data = Parser().parse(test_target)
>> parsed_data
>> [ParsedResult(field=1, wire_type="string", data='테스트')]
"""
# proto
message Test1 {
int32 a = 1;
}
message Test2 {
Test1 b = 3;
}
# message
{
"a": {
"b": 150
}
}
# binary
1a 03 08 96 01
"""
test_target = "1a 03 08 96 01"
parsed_data = Parser().parse(test_target)
>> parsed_data
>> [ParsedResult(field=3, wire_type="length_delimited", data=[ParsedResult(field=1, wire_type="varint", data=150)])]
"""
# proto
message Test1 {
required string a = 1;
}
# message
{
"a": "✊"
}
# binary
0A 03 E2 9C 8A
"""
test_target = "0A 03 E2 9C 8A"
parsed_data = Parser().parse(test_target)
>> parsed_data
>> [ParsedResult(field=1, wire_type="string", data='✊')]
Reference
Metadata
Release files for protobuf-decoder 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| protobuf_decoder-0.1.0.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| protobuf_decoder-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / protobuf_decoder-0.1.0.tar.gz
| Download URL | protobuf_decoder-0.1.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b78bf194d50413a4b64a58844be1d0ac9be8bd8a2b8805cfd4358a51414b097d
|
|
BLAKE2b-256 checksum How to use checksums |
58e55e27466288cab11e62b9dd944f86011ebf6b8f5ec03e8190c6d8c245c564
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.2.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.12
|
Release files / protobuf_decoder-0.1.0-py3-none-any.whl
| Download URL | protobuf_decoder-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
defd328667ce46e29eb6c4d032279b1040546f019db56effc70b3b2845ae7b1a
|
|
BLAKE2b-256 checksum How to use checksums |
5745e221044767daf250f8decb402ba1ab756a7a8f2924cbcf1f295e054de798
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.2.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.12
|