jsonld-ex 0.1.0__py3-none-any.whl → 0.1.2__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.
- jsonld_ex/__init__.py +1 -1
- jsonld_ex-0.1.2.dist-info/METADATA +80 -0
- {jsonld_ex-0.1.0.dist-info → jsonld_ex-0.1.2.dist-info}/RECORD +5 -5
- jsonld_ex-0.1.0.dist-info/METADATA +0 -26
- {jsonld_ex-0.1.0.dist-info → jsonld_ex-0.1.2.dist-info}/WHEEL +0 -0
- {jsonld_ex-0.1.0.dist-info → jsonld_ex-0.1.2.dist-info}/top_level.txt +0 -0
jsonld_ex/__init__.py
CHANGED
|
@@ -5,7 +5,7 @@ Reference implementation of proposed JSON-LD 1.2 extensions.
|
|
|
5
5
|
Wraps PyLD for core JSON-LD processing and adds extension layers.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
__version__ = "0.1.
|
|
8
|
+
__version__ = "0.1.2"
|
|
9
9
|
|
|
10
10
|
from jsonld_ex.processor import JsonLdEx
|
|
11
11
|
from jsonld_ex.ai_ml import annotate, get_confidence, get_provenance, filter_by_confidence
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: jsonld-ex
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: JSON-LD 1.2 extensions for AI/ML data exchange, security hardening, and validation
|
|
5
|
+
Author-email: Muntaser Aljabry <jemsbhai@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: json-ld,linked-data,semantic-web,ai,ml,confidence,provenance,embeddings,security,validation
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
19
|
+
Requires-Python: >=3.9
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
Requires-Dist: PyLD>=2.0.4
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
24
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
25
|
+
Requires-Dist: mypy>=1.8; extra == "dev"
|
|
26
|
+
Requires-Dist: ruff>=0.2; extra == "dev"
|
|
27
|
+
|
|
28
|
+
# jsonld-ex
|
|
29
|
+
|
|
30
|
+
**JSON-LD 1.2 Extensions for AI/ML Data Exchange, Security, and Validation**
|
|
31
|
+
|
|
32
|
+
Reference implementation of proposed JSON-LD 1.2 extensions. Wraps [PyLD](https://github.com/digitalbazaar/pyld) for core processing and adds extension layers.
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pip install jsonld-ex
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Quick Start
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
from jsonld_ex import JsonLdEx, annotate
|
|
44
|
+
|
|
45
|
+
# Annotate a value with AI/ML provenance
|
|
46
|
+
name = annotate(
|
|
47
|
+
"John Smith",
|
|
48
|
+
confidence=0.95,
|
|
49
|
+
source="https://ml-model.example.org/ner-v2",
|
|
50
|
+
method="NER",
|
|
51
|
+
)
|
|
52
|
+
# {'@value': 'John Smith', '@confidence': 0.95, '@source': '...', '@method': 'NER'}
|
|
53
|
+
|
|
54
|
+
# Validate against a shape
|
|
55
|
+
from jsonld_ex import validate_node
|
|
56
|
+
|
|
57
|
+
shape = {
|
|
58
|
+
"@type": "Person",
|
|
59
|
+
"name": {"@required": True, "@type": "xsd:string"},
|
|
60
|
+
"age": {"@type": "xsd:integer", "@minimum": 0, "@maximum": 150},
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
result = validate_node({"@type": "Person", "name": "John", "age": 30}, shape)
|
|
64
|
+
assert result.valid
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Features
|
|
68
|
+
|
|
69
|
+
- **AI/ML Extensions**: `@confidence`, `@source`, `@extractedAt`, `@method`, `@humanVerified`
|
|
70
|
+
- **Vector Embeddings**: `@vector` container type with dimension validation
|
|
71
|
+
- **Security**: `@integrity` context verification, allowlists, resource limits
|
|
72
|
+
- **Validation**: `@shape` native validation framework
|
|
73
|
+
|
|
74
|
+
## Documentation
|
|
75
|
+
|
|
76
|
+
Full documentation and specifications: [github.com/jemsbhai/jsonld-ex](https://github.com/jemsbhai/jsonld-ex)
|
|
77
|
+
|
|
78
|
+
## License
|
|
79
|
+
|
|
80
|
+
MIT
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
jsonld_ex/__init__.py,sha256=
|
|
1
|
+
jsonld_ex/__init__.py,sha256=xhzcF6gIK4CXc_UL_WLMVJQ3idZYoZ1ecj2cD3yJYJs,921
|
|
2
2
|
jsonld_ex/ai_ml.py,sha256=0SvM2RADWLAandxfYTFMMmQUMuTRzqkezpwplpGRP3A,4973
|
|
3
3
|
jsonld_ex/processor.py,sha256=tRZX2aiHwZJa62ex4KT0HCbKYtzAkGV87bDBtXAhbvE,3880
|
|
4
4
|
jsonld_ex/security.py,sha256=PCHZ7NTCy_WeuI_BNTKIMIH00OzLtozu47y5x1E8Fhg,3251
|
|
5
5
|
jsonld_ex/validation.py,sha256=FjnRotqb9irWNARhh_eY6xBxFLCZDHJAczAHc0EUE2Q,6266
|
|
6
6
|
jsonld_ex/vector.py,sha256=SHTHAcU2xa-Gh_Q4YQiOy1QX1_5O_U-vkODpwzj0Irc,2885
|
|
7
|
-
jsonld_ex-0.1.
|
|
8
|
-
jsonld_ex-0.1.
|
|
9
|
-
jsonld_ex-0.1.
|
|
10
|
-
jsonld_ex-0.1.
|
|
7
|
+
jsonld_ex-0.1.2.dist-info/METADATA,sha256=WLAJfQ7ISdcQGLJK8LoQ0ExKzEWrfUQgYrcbi6bWhFM,2576
|
|
8
|
+
jsonld_ex-0.1.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
9
|
+
jsonld_ex-0.1.2.dist-info/top_level.txt,sha256=YMe-47TNES9MWZsVWecMwZUDjGxCeU51ay5fuqidBfk,10
|
|
10
|
+
jsonld_ex-0.1.2.dist-info/RECORD,,
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: jsonld-ex
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: JSON-LD 1.2 extensions for AI/ML data exchange, security hardening, and validation
|
|
5
|
-
Author-email: Muntaser Aljabry <muntaser@example.com>
|
|
6
|
-
License: MIT
|
|
7
|
-
Keywords: json-ld,linked-data,semantic-web,ai,ml,confidence,provenance,embeddings,security,validation
|
|
8
|
-
Classifier: Development Status :: 3 - Alpha
|
|
9
|
-
Classifier: Intended Audience :: Developers
|
|
10
|
-
Classifier: Intended Audience :: Science/Research
|
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
-
Classifier: Topic :: Software Development :: Libraries
|
|
19
|
-
Requires-Python: >=3.9
|
|
20
|
-
Description-Content-Type: text/markdown
|
|
21
|
-
Requires-Dist: PyLD>=2.0.4
|
|
22
|
-
Provides-Extra: dev
|
|
23
|
-
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
24
|
-
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
25
|
-
Requires-Dist: mypy>=1.8; extra == "dev"
|
|
26
|
-
Requires-Dist: ruff>=0.2; extra == "dev"
|
|
File without changes
|
|
File without changes
|