Skip to content

Package for converting Python's JSON representation to (or from) a Python object of a given type

License

Notifications You must be signed in to change notification settings

volkerstampa/jsonype

Repository files navigation

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

  • uv >=0.9: Can be installed with pipx:

    • pipx install uv

    See uv's documentation for alternative installation options.

  • Python >= 3.11: Can be installed with uv:

    • uv python install 3.11
  • make for building documentation

  • enchant for spell checking with Pylint including a dictionary for en. In Debian based systems this can be installed with:

    • sudo apt install enchant-2 aspell-en

Setup virtual env

uv sync
. .venv/bin/activate

All commands below assume that they are executed in the activated virtual environment and the current directory is set to the project's root folder. If the virtual environment is not activated the commands have to be prefixed with uv run

Run checks

./check.sh

This does not only check, but it also applies fixes that can be applied automatically. To run checks only:

./check.sh --no-fix

Checks include spell checking by default which requires enchant to be installed. If this is not available you can run:

./check.sh --no-spellcheck

Run build

./build.sh

Release

./release.sh [#.#.#]
git push [GITHUB-REPO] v[#.#.#]

Documentation

Add new modules/packages

cd docs
sphinx-apidoc -o source ../jsonype/

About

Package for converting Python's JSON representation to (or from) a Python object of a given type

Resources

License

Security policy

Stars

Watchers

Forks

Contributors 2

  •  
  •