A package for converting classes with type hints to/from JSON
Project description
jsonype
Usage
See documentation.
Similar tools
- typedload is also a package to "Load and dump json-like data into typed data structures in Python3". It uses a less permissive license.
- Pydantic is a widely used data validation library for Python.
It is often used for converting to and from JSON, but offers much more than that. Unlike in case of
jsonype classes that should be converted from/to JSON need to inherit from a base class (
BaseModel
).
Development
Prerequisites
- python >= 3.11:
Can be installed with pyenv:
- pyenv install 3.11
- Poetry >=1.2
On Ubuntu can be installed with
sudo apt install python3-poetry
. See Poetry's documentation for alternative installation options. - make for building documentation
Setup virtual env
poetry self add poetry-setuptools-scm-plugin@latest
poetry install
poetry shell
All commands below assume that they are executed in a corresponding
virtual environment (e.g. in a shell started by poetry shell
) and the
current directory is set to the project's root folder.
Run checks
./check.sh
Run build
./build.sh
Documentation
Add new modules/packages
cd docs
sphinx-apidoc -o source ../jsonype/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jsonype-0.2.0.tar.gz
(13.9 kB
view details)
Built Distribution
jsonype-0.2.0-py3-none-any.whl
(15.3 kB
view details)
File details
Details for the file jsonype-0.2.0.tar.gz
.
File metadata
- Download URL: jsonype-0.2.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbcc705603990a9fd928440001adb0b29c287357924738e56700a4d11af132f3 |
|
MD5 | ab8ea6bda0361b779397d1786f8ab778 |
|
BLAKE2b-256 | c8b42987aef3c782fe2b34d23f30824e3fcd9bca62d48ae4f761316a20ec4773 |
File details
Details for the file jsonype-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: jsonype-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6593bf4afe648cad9077b68309213d0492304a8460af3a4b4e713310fbf63486 |
|
MD5 | 2980cd9a2bf4ecb1876f73f83b3c2239 |
|
BLAKE2b-256 | 586eaca71d97bdadd9b0522a13fd65f8f2c19ab5991c945a536ae4172cb490fe |