Metadata-Version: 2.1
Name: enochecker-core
Version: 0.10.0
Summary: Base library for enochecker libs
Home-page: https://github.com/enowars/enochecker_core
Author: Trolldemorted
Author-email: benediktradtke@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.7
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

# enochecker_core [![PyPI version](https://badge.fury.io/py/enochecker-core.svg)](https://pypi.org/project/enochecker-core) [![Build Status](https://github.com/enowars/enochecker_core/actions/workflows/pythonapp.yml/badge.svg?branch=main)](https://github.com/enowars/enochecker_core/actions/workflows/pythonapp.yml) ![Lines of code](https://tokei.rs/b1/github/enowars/enochecker_core)

This package provides dataclasses and enums adhering to the [specification](https://github.com/enowars/specification).

Since the specification defines keys in camel case, whereas this package follows python naming convention and has keys in snake case, the keys need to be transformed when sending/receiving them over the wire. The recommended way is to use the `jsons` (not `json`) package.

Example:
```
>>> from enochecker_core import CheckerTaskResult, CheckerResultMessage
>>> import jsons
>>> jsons.dumps(CheckerResultMessage(result=CheckerTaskResult.OK, message="some message"), use_enum_name=False, key_transformer=jsons.KEY_TRANSFORMER_CAMELCASE)
'{"message": "some message", "result": "OK"}'
>>> jsons.loads('{"message": "some message", "result": "OK"}', CheckerResultMessage, key_transformer=jsons.KEY_TRANSFORMER_SNAKECASE, strict=True)
CheckerResultMessage(result=<CheckerTaskResult.OK: 'OK'>, message='some message')
```

