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.3.tar.gz
(8.6 kB
view hashes)
Built Distribution
Close
Hashes for jsonclasses-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c16568bf7696d71bc5a7eb08ff6962257d87dda0b411f1f779ae09dd03d9ceb3 |
|
MD5 | 2e377e72d6a8dd04438a8ab3d9c489c0 |
|
BLAKE2b-256 | 95843291d9ca20edfb09e3b3e93bf6ce45af36cafd9060d1ceb56902d47b5b74 |