Skip to main content

Base library for enochecker libs

Project description

enochecker_core PyPI version Build Status Lines of code

This package provides dataclasses and enums adhering to the 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.


>>> 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')

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

enochecker_core-0.10.0.tar.gz (3.7 kB view hashes)

Uploaded source

Built Distribution

enochecker_core-0.10.0-py3-none-any.whl (3.6 kB view hashes)

Uploaded py3

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