cddl-verifier 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,32 @@
1
+ """cddl-verifier: validate CBOR data against CDDL schemas and render EDN.
2
+
3
+ Public API::
4
+
5
+ from cddl_verifier import validate, Validator
6
+
7
+ result = validate(schema_text, cbor_bytes, root_type="corim-map")
8
+ if not result.valid:
9
+ for diagnostic in result.diagnostics:
10
+ print(diagnostic)
11
+
12
+ CBOR helpers live in :mod:`cddl_verifier.cbor` and JSON conversion in
13
+ :mod:`cddl_verifier.json_codec`. Modules whose names start with an underscore
14
+ are internal and may change in any release.
15
+
16
+ The supported CDDL (RFC 8610) and CBOR (RFC 8949) features are a practical
17
+ subset; see the project README for what is and is not covered.
18
+ """
19
+
20
+ from ._api import Diagnostic, SchemaError, ValidationResult, Validator, validate
21
+ from ._cbor import CBORDecodeError
22
+ from ._version import __version__
23
+
24
+ __all__ = [
25
+ "CBORDecodeError",
26
+ "Diagnostic",
27
+ "SchemaError",
28
+ "ValidationResult",
29
+ "Validator",
30
+ "__version__",
31
+ "validate",
32
+ ]
@@ -0,0 +1,5 @@
1
+ """Allow ``python -m cddl_verifier`` as an alias for ``cddl-verify``."""
2
+
3
+ from .cli import main
4
+
5
+ main()