data serialize
Project description
data_serialize
This library allows reading and writing binary to string
Installation
pip3 install data_serialize
serialize and deserialize
import data_serialize
def test_feature():
val1 = data_serialize.Int64List(value =[1,2,3] * 20)
val2 = data_serialize.FloatList(value =[1,2,3] * 20)
val3 = data_serialize.BytesList(value = [b'The china', b'boy'])
featrue = data_serialize.Features(feature=
{
"item_0": data_serialize.Feature(int64_list = val1),
"item_1": data_serialize.Feature(float_list = val2),
"item_2": data_serialize.Feature(bytes_list = val3)
}
)
example = data_serialize.Example(features=featrue)
print(example.SerializeToString())
cls = data_serialize.Example()
cls.ParseFromString(example.SerializeToString())
print(cls)
test_feature()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for data_serialize-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1381173b201958133ff78b132d7fa1a99a3407b3962ddf1429eab05cc01f703 |
|
MD5 | dccdaa55b83d2a018e7495b79ff9b295 |
|
BLAKE2b-256 | 296eba042ae126d898ab623c78c8a2dcfff7efe983538037e476c91341ace18d |