Protocol Buffer used to serialize and compress data
Project description
ZiProto
ZiProto is used to serialize data, ZiProto is designed with the intention to be used for transferring data instead of using something like JSON which can use up more bandwidth when you don't intend to have the data shown to the public or end-user
Setup
python setup.py install
Usage
To encode data, this can be done simply
>> import ziproto
>> ziproto.encode({"foo": "bar", "fruits": ['apple', 'banana']})
bytearray(b'\x82\xa6fruits\x92\xa5apple\xa6banana\xa3foo\xa3bar')
The same can be said when it comes to decoding
>> import ziproto
>> Data = ziproto.encode({"foo": "bar", "fruits": ['apple', 'banana']})
>> ziproto.decode(Data)
{'foo': 'bar', 'fruits': ['apple', 'banana']}
To determine what type of variable you are dealing with, you could use the decoder
>> import ziproto
>> from ziproto.ZiProtoDecoder import Decoder
>> Data = ziproto.encode({"foo": "bar", "fruits": ['apple', 'banana']})
>> SuperDecoder = Decoder(Data)
>> print(SuperDecoder.get_type())
ValueType.MAP
License
Copyright 2018 Zi Xing Narrakas
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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 Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ziproto-1.0-py3-none-any.whl.
File metadata
- Download URL: ziproto-1.0-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1c35474f8fb7fd9ef31d754b355c42b404c20c283f213b03ecd69ec8d5b044f
|
|
| MD5 |
6d7c4b6a6622007062143a307340df96
|
|
| BLAKE2b-256 |
0da3516b361e1a2f44545350970d4482ea2438219faa6a439b59dab397d045af
|