PyJackson is a serialization library based on type hinting
Project description
PyJackson is a serialization library based on type hinting
Example
Just type hint __init__ and you are ready to go:
import pyjackson class MyPayload: def __init__(self, string_field: str, int_field: int): self.string_field = string_field self.int_field = int_field pyjackson.serialize(MyPayload('value', 10)) # {'string_field': 'value', 'int_field': 10} pyjackson.deserialize({'string_field': 'value', 'int_field': 10}, MyPayload) # MyPayload('value', 10)
More features and examples here and in examples dir.
Installation
pip install pyjackson
Documentation
Development
To run all tests run:
tox
Licence
Free software: Apache Software License 2.0
Changelog
0.0.12 (2019-10-28)
Fixed is_serializable for Field
0.0.11 (2019-10-28)
Fixed is_serializable for Signature
0.0.10 (2019-10-16)
Set class name and module of hierarchy root to be valid
0.0.9 (2019-10-09)
Removed empty Serialzier __init__ method and fix for staticmethod in serializer
0.0.8 (2019-10-07)
Changed is_collection to not include dict type
0.0.7 (2019-10-04)
Added datetime.datetime serializer
0.0.6 (2019-10-02)
Added Tuple[X, Y] and Tuple[X, …] support
0.0.5 (2019-09-30)
Fixed comparison of serializers
0.0.4 (2019-09-17)
Added some examples and minor fixes
0.0.3 (2019-09-17)
First release on PyPI.
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
Hashes for pyjackson-0.0.12-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e80a54ef31f13b60411c5654e77d3cde61f04dcdf03beb6cf5c4b4d2fb6e2f1a |
|
MD5 | a510d5d38a52a6bd64ecd31c7434ae1a |
|
BLAKE2b-256 | 0bbff4e36f22431ccf34c143c6b193554c4c7d6a5db8f6bbc6debc9e0450bb3f |