datamorph-python 1.22.1__cp38-abi3-win_amd64.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.
datamorph/__init__.py ADDED
@@ -0,0 +1,27 @@
1
+ """Python bindings for the DataMorph transformation engine."""
2
+
3
+ from ._native import (
4
+ DataMorphEngine,
5
+ DataMorphError,
6
+ eval_expression,
7
+ evaluate,
8
+ read,
9
+ transform,
10
+ validate,
11
+ version,
12
+ write,
13
+ )
14
+
15
+ __all__ = [
16
+ "DataMorphEngine",
17
+ "DataMorphError",
18
+ "eval_expression",
19
+ "evaluate",
20
+ "read",
21
+ "transform",
22
+ "validate",
23
+ "version",
24
+ "write",
25
+ ]
26
+
27
+ __version__ = version()
datamorph/_native.pyd ADDED
Binary file
Binary file
@@ -0,0 +1,88 @@
1
+ Metadata-Version: 2.4
2
+ Name: datamorph-python
3
+ Version: 1.22.1
4
+ Classifier: Development Status :: 3 - Alpha
5
+ Classifier: Intended Audience :: Developers
6
+ Classifier: License :: OSI Approved :: Apache Software License
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3 :: Only
10
+ Classifier: Programming Language :: Python :: Implementation :: CPython
11
+ Classifier: Programming Language :: Rust
12
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
13
+ Classifier: Topic :: Text Processing :: Markup :: XML
14
+ Summary: Python bindings for the DataMorph transformation engine
15
+ Keywords: datamorph,transformation,xml,json,csv,yaml
16
+ Home-Page: https://data-morph.com
17
+ Author: Armin Majerie
18
+ License: MIT OR Apache-2.0
19
+ Requires-Python: >=3.8
20
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
21
+ Project-URL: Documentation, https://data-morph.com
22
+ Project-URL: Homepage, https://data-morph.com
23
+ Project-URL: Repository, https://github.com/arminmajerie/data-morph
24
+
25
+ # datamorph-python
26
+
27
+ `datamorph-python` exposes the DataMorph transformation engine as a normal Python package.
28
+
29
+ Install it with:
30
+
31
+ ```bash
32
+ pip install datamorph-python
33
+ ```
34
+
35
+ Then import it with:
36
+
37
+ ```python
38
+ from datamorph import evaluate, read, write
39
+ ```
40
+
41
+ ## Quick Start
42
+
43
+ ```python
44
+ from datamorph import evaluate
45
+
46
+ script = """
47
+ output application/json
48
+ ---
49
+ {
50
+ id: payload.id,
51
+ requestId: headers.requestId,
52
+ stage: attributes.stage,
53
+ env: vars.env
54
+ }
55
+ """
56
+
57
+ result = evaluate(
58
+ script,
59
+ payload={"id": 42},
60
+ headers={"requestId": "req-001"},
61
+ attributes={"stage": "test"},
62
+ variables={"env": "dev"},
63
+ )
64
+
65
+ assert result == {
66
+ "id": 42,
67
+ "requestId": "req-001",
68
+ "stage": "test",
69
+ "env": "dev",
70
+ }
71
+ ```
72
+
73
+ ## API
74
+
75
+ - `evaluate(script, payload=None, headers=None, attributes=None, variables=None, payload_mime=None)`
76
+ - `transform(...)` as an alias for `evaluate(...)`
77
+ - `eval_expression(expression)`
78
+ - `read(input_text, mime_type)`
79
+ - `write(data, mime_type)`
80
+ - `validate(script)`
81
+ - `version()`
82
+
83
+ ## Notes
84
+
85
+ - Package name on PyPI: `datamorph-python`
86
+ - Import name in Python: `datamorph`
87
+ - Wheels built from this folder contain the Rust engine, so users do not need a separate DataMorph installation.
88
+
@@ -0,0 +1,7 @@
1
+ datamorph/__init__.py,sha256=8Xv_M8KtNW-w_wYJfHc2Mhv6ggWhFcVaFNOej3HfIew,425
2
+ datamorph/_native.pyd,sha256=zdA8UhcQNZp5GOZ42Z2x3eFeqhjAFFfMlGkbw4Wg5D8,9045504
3
+ datamorph/datamorph_py.pdb,sha256=ObUfATFwrl4opgEJYcpNiZrbOKjkaG5IviVROLSedXQ,172220416
4
+ datamorph_python-1.22.1.dist-info/METADATA,sha256=I6CoMq2jJuuzZmzNUWMZ7LEG54lmtJpqHbXRfEPfAjk,2277
5
+ datamorph_python-1.22.1.dist-info/WHEEL,sha256=fdxqql7XL4cnyN7OrL_SjRKCGgYJBps58hHqX7lIgJ8,95
6
+ datamorph_python-1.22.1.dist-info/sboms/datamorph-py.cyclonedx.json,sha256=ykyqBUzu79E7l4LuW75iXGTEeGWfHP7jQeNMO34M2Xk,272176
7
+ datamorph_python-1.22.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.13.3)
3
+ Root-Is-Purelib: false
4
+ Tag: cp38-abi3-win_amd64