Skip to main content

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.5.tar.gz (9.0 kB view hashes)

Uploaded Source

Built Distribution

jsonclasses-0.1.5-py3-none-any.whl (18.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page