Python @dataclass <=> JSON declarable, interchangeable, validatable, sanitizable.
Project description
jsonclasses
Python @dataclass <=> JSON declarable, interchangeable, validatable, sanitizable.
Motivation
Python lacks a great solution of JSON web inputs, JSON objects manipulation and serialization. By declaring field specifications with Python class and @dataclass, we can solve this issue elegantly.
Example
Converting from dict
Coverting to dict
Sanitization
Validation
Integration with web frameworks
Using jsonclasses
with sanic
web framework.
Using jsonclasses
with flask
web framework.
Installation
Install jsonclasses
package with pip
.
pip install jsonclasses
Supported Python versions
jsonclasses
supports Python >= 3.5
.
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 Distribution
jsonclasses-0.1.2.tar.gz
(8.6 kB
view hashes)
Built Distribution
Close
Hashes for jsonclasses-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 822994b6ff1064a2fccad7c0d9f031bd6c626a9d1a53941a44476cb837c33b7e |
|
MD5 | 2f7525f899b9b8053156e6cc562169f6 |
|
BLAKE2b-256 | 9d1783cf129c82067abe5bdd7c3fc4feef996b0c81ad577952165ca9c8f836c9 |