CW Msgpack Coder
Introduction
Simple pure Python object encoder and decoder using msgpack (u-msgpack-python package at bottom).
It allows encode Python object with high speed and compression since we using msgpack at bottom.
It reduce code overhead to minimum and allow you focus on algorithms.
How to use it
It is very simple:
from cw_msgpack_coder.umsgpack_coder import UmsgpackCoder
class YourNestedClass:
pass
class YourClass:
def __init__(name, nested)
self.name = name
self.nested = nested
# create coder
coder = UmsgpackCoder()
# register your classes
# required because of security reasons
coder.set_default_coder_for_class(self.YourClass)
coder.set_default_coder_for_class(self.YourNestedClass)
# register old modules and classes names
# required if you renamed some modules or classes and want load old data
# not need for this example
coder.set_old_module_and_class_name_to_current(
'old_module_name', 'YourClass',
'__main__', 'YourClass')
# now create some objects to test
o = YourClass('hello world!', YourNestedClass())
# encode to bytes
encoded = coder.dumps(o)
# decode bytes to objects
o2 = coder.decode(encoded)
# o == o2!
Metadata
Release files for cw_msgpack_coder 1.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cw_msgpack_coder-1.1.8.tar.gz | 3.6 kB | Without provenance | Details for cw_msgpack_coder-1.1.8.tar.gz |
Release files / cw_msgpack_coder-1.1.8.tar.gz
| Download URL | cw_msgpack_coder-1.1.8.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
718dcf555a4a03586f58f68be4cdc192db2023cfb8e3189843bcdbff82d24e4b
|
|
BLAKE2b-256 checksum How to use checksums |
94138dc8d4a3a2948dde0b3826babb92c2089bf82fc724a8561df9e6f19c3607
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|
Security for cw_msgpack_coder 1.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.