Skip to main content

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

https://pyjackson.readthedocs.io/

Development

To run all tests run:

tox

Licence

  • Free software: Apache Software License 2.0

Changelog

0.0.28 (2021-06-02)

  • Support for python 3.9

0.0.27 (2020-12-05)

  • Fix decorated class module name

0.0.26 (2020-07-07)

  • Experimental pydantic support

0.0.25 (2020-03-23)

  • Support for int and float keys in dicts

0.0.24 (2020-02-22)

  • Support for python 3.8

0.0.23 (2019-12-16)

  • Fixed bug in subtype resolving

0.0.21 (2019-11-25)

  • Fixed default type name

0.0.19 (2019-11-25)

  • Allow subtype reregistration flag

0.0.18 (2019-11-22)

  • Added support for full class path in type field (with importing logic)

0.0.17 (2019-11-21)

  • Added Any support for serde skipping

0.0.16 (2019-11-15)

  • Raise on subtype resolve error and fix for camel case forward ref resolving

0.0.15 (2019-11-11)

  • Set class docstring and qualname of hierarchy root to be valid

0.0.14 (2019-11-05)

  • Added decorator for camel case field renaming

0.0.13 (2019-11-03)

  • Added decorator for field renaming

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.

Metadata

Release files for pyjackson 0.0.28

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyjackson 0.0.28
File Size Uploaded Provenance Actions
pyjackson-0.0.28.tar.gz 36.1 kB Without provenance Details for pyjackson-0.0.28.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyjackson 0.0.28
File Interpreter ABI Platform Actions
pyjackson-0.0.28-py2.py3-none-any.whl Python 3, Python 2 none any Details for pyjackson-0.0.28-py2.py3-none-any.whl

Total release size: 57.0 kB

Release files / pyjackson-0.0.28.tar.gz

Download URL pyjackson-0.0.28.tar.gz
Size 36.1 kB
Tags Source
SHA-256 checksum
How to use checksums
440b57493e1aa7eef32ca1bf0eb311610080c3845e4a719deb0b31b1bee1a49f
BLAKE2b-256 checksum
How to use checksums
c390326c78b848fa5c1eb782b7d8518d05077751bfbeb4ef6856ec71207e9ec4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.6.7

Release files / pyjackson-0.0.28-py2.py3-none-any.whl

Download URL pyjackson-0.0.28-py2.py3-none-any.whl
Size 21.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
9926cb2dc229c773837ddc124736af7e1a59f30a1b444e2f795781fe467caae2
BLAKE2b-256 checksum
How to use checksums
dd3a60fce3e30f3f1cbca6d15c245d10ba0c3bb81e34098c30236b0a683ad1b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.6.7

Security for pyjackson 0.0.28

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page