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.
- cddl_verifier/__init__.py +32 -0
- cddl_verifier/__main__.py +5 -0
- cddl_verifier/_analyzer.py +2764 -0
- cddl_verifier/_api.py +180 -0
- cddl_verifier/_cbor.py +1365 -0
- cddl_verifier/_json_codec.py +430 -0
- cddl_verifier/_version.py +7 -0
- cddl_verifier/cbor.py +56 -0
- cddl_verifier/cli.py +12 -0
- cddl_verifier/json_codec.py +25 -0
- cddl_verifier-0.1.0.dist-info/METADATA +219 -0
- cddl_verifier-0.1.0.dist-info/RECORD +16 -0
- cddl_verifier-0.1.0.dist-info/WHEEL +5 -0
- cddl_verifier-0.1.0.dist-info/entry_points.txt +2 -0
- cddl_verifier-0.1.0.dist-info/licenses/LICENSE +21 -0
- cddl_verifier-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -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
|
+
]
|