PyPI - Version Downloads Code style: black

JSON Class Database

En- and decode data-types and classes to JSON-type files or databases.

Installation

To install, run pip install jcdb.

Usage

Get started by importing jcdb:

import jcdb

Inherit from the jcdb.Object class:

# Create a dummy class
class I(jcdb.Object):
  pass

I.register(I)

# Create an object
i = I()

# Serialize / deserialize objects
i.encode() == I.decode(i.encode()) # True

This also works well if your inheriting class contains objects of other inheriting Object classes that are registered.

About

The JCDB source code is hosted on GitHub, the Python module on PyPI and its docs on readthedocs. It is provided under the MIT license.

JCDB is a project by Finn M Glas, you can sponsor it or contact Finn about major issues or cooperations.