nemo-python 0.10.1__cp312-cp312-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.
@@ -0,0 +1,56 @@
1
+ Metadata-Version: 2.4
2
+ Name: nemo-python
3
+ Version: 0.10.1
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ Summary: Python bindings for nemo, a fast in-memory rule engine
8
+ Home-Page: https://github.com/knowsys/nemo
9
+ Requires-Python: >=3.7
10
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
11
+
12
+ # nemo-python - Python bindings for nemo
13
+
14
+ This crate provide python bindings for the `nemo` crate.
15
+
16
+ > **Note**
17
+ > These bindings are currently in an experimental state and subject to change.
18
+
19
+ ## Building
20
+
21
+ You will need to install [maturin](https://www.maturin.rs/). To try these bindings in a python virtualenv simply run:
22
+
23
+ ```
24
+ maturin develop
25
+ ```
26
+
27
+ ### Build using **nix**
28
+
29
+ If you want to run a python session with with the `nmo_python` wheel installed, you can run the following command in the top-level directory of this repository:
30
+
31
+ ```
32
+ nix run .#python
33
+ ```
34
+
35
+ ## Example usage
36
+ ```python
37
+ from nmo_python import load_string, NemoEngine, NemoOutputManager
38
+
39
+ rules="""
40
+ data(1,2) .
41
+ data(hi,42) .
42
+ data(hello,world) .
43
+
44
+ calculated(?x, !v) :- data(?y, ?x) .
45
+ @export calculated :- csv {}.
46
+ """
47
+
48
+ engine = NemoEngine(load_string(rules))
49
+ engine.reason()
50
+
51
+ print(list(engine.result("calculated")))
52
+
53
+ output_manager = NemoOutputManager("results", gzip=True)
54
+ engine.write_result("calculated", output_manager)
55
+ ```
56
+
@@ -0,0 +1,6 @@
1
+ nemo_python-0.10.1.dist-info/METADATA,sha256=dzV_Uk5P_TYw1HVUPE9Zuptw-rVtZXvRuycHSeXx6cc,1476
2
+ nemo_python-0.10.1.dist-info/WHEEL,sha256=Uf438hGD-NUftH08dxSaiYRxcfiZqeYK9g3DNJ-vPY0,97
3
+ nemo_python-0.10.1.dist-info/sboms/nemo-python.cyclonedx.json,sha256=zQxQWNiD0qUfm4jKzHpF8Jbha_IE-Suzu1GbxBk3XTY,285744
4
+ nmo_python/__init__.py,sha256=rlyTAr_47Jogoc8Bd_RqFPEKJtSDlpB7ZcmFfRzVF2Y,123
5
+ nmo_python/nmo_python.cp312-win_amd64.pyd,sha256=QxDxUIeRCHUxIcn7QCSrCtqT6ypRtmxgY1BYw18ZevA,12317696
6
+ nemo_python-0.10.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.15.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp312-cp312-win_amd64