trustgraph-base 0.16.6__tar.gz → 0.16.8__tar.gz
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.
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/PKG-INFO +2 -2
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/api/api.py +17 -18
- trustgraph-base-0.16.8/trustgraph/base_version.py +1 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/knowledge/__init__.py +1 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/knowledge/defs.py +8 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/knowledge/document.py +11 -1
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/knowledge/organization.py +11 -1
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/knowledge/publication.py +11 -1
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph_base.egg-info/PKG-INFO +2 -2
- trustgraph-base-0.16.6/trustgraph/base_version.py +0 -1
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/README.md +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/setup.cfg +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/setup.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/api/__init__.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/base/__init__.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/base/base_processor.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/base/consumer.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/base/consumer_producer.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/base/producer.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/clients/__init__.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/clients/agent_client.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/clients/base.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/clients/document_embeddings_client.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/clients/document_rag_client.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/clients/embeddings_client.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/clients/graph_embeddings_client.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/clients/graph_rag_client.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/clients/llm_client.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/clients/prompt_client.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/clients/triples_query_client.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/exceptions.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/knowledge/identifier.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/log_level.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/objects/__init__.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/objects/field.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/objects/object.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/rdf.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/schema/__init__.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/schema/agent.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/schema/documents.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/schema/graph.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/schema/metadata.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/schema/models.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/schema/object.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/schema/prompt.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/schema/retrieval.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/schema/topic.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/schema/types.py +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph_base.egg-info/SOURCES.txt +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph_base.egg-info/dependency_links.txt +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph_base.egg-info/requires.txt +0 -0
- {trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph_base.egg-info/top_level.txt +0 -0
@@ -1,12 +1,12 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-base
|
3
|
-
Version: 0.16.
|
3
|
+
Version: 0.16.8
|
4
4
|
Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
|
5
5
|
Home-page: https://github.com/trustgraph-ai/trustgraph
|
6
6
|
Author: trustgraph.ai
|
7
7
|
Author-email: security@trustgraph.ai
|
8
8
|
License: UNKNOWN
|
9
|
-
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.16.
|
9
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.16.8.tar.gz
|
10
10
|
Platform: UNKNOWN
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
12
12
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
@@ -4,7 +4,7 @@ import json
|
|
4
4
|
import dataclasses
|
5
5
|
import base64
|
6
6
|
|
7
|
-
from trustgraph.knowledge import hash
|
7
|
+
from trustgraph.knowledge import hash, Uri, Literal
|
8
8
|
|
9
9
|
class ProtocolException(Exception):
|
10
10
|
pass
|
@@ -12,14 +12,6 @@ class ProtocolException(Exception):
|
|
12
12
|
class ApplicationException(Exception):
|
13
13
|
pass
|
14
14
|
|
15
|
-
class Uri(str):
|
16
|
-
def is_uri(self): return True
|
17
|
-
def is_literal(self): return False
|
18
|
-
|
19
|
-
class Literal(str):
|
20
|
-
def is_uri(self): return False
|
21
|
-
def is_literal(self): return True
|
22
|
-
|
23
15
|
@dataclasses.dataclass
|
24
16
|
class Triple:
|
25
17
|
s : str
|
@@ -213,9 +205,16 @@ class Api:
|
|
213
205
|
"limit": limit
|
214
206
|
}
|
215
207
|
|
216
|
-
if
|
217
|
-
|
218
|
-
if
|
208
|
+
if not isinstance(s, Uri):
|
209
|
+
raise RuntimeError("s must be Uri")
|
210
|
+
if not isinstance(p, Uri):
|
211
|
+
raise RuntimeError("p must be Uri")
|
212
|
+
if not isinstance(o, Uri) and not isinstance(o, Literal):
|
213
|
+
raise RuntimeError("o must be Uri or Literal")
|
214
|
+
|
215
|
+
if s: input["s"] = { "v": str(s), "e": isinstance(s, Uri), }
|
216
|
+
if p: input["p"] = { "v": str(p), "e": isinstance(p, Uri), }
|
217
|
+
if o: input["o"] = { "v": str(o), "e": isinstance(o, Uri), }
|
219
218
|
|
220
219
|
url = f"{self.url}triples-query"
|
221
220
|
|
@@ -273,9 +272,9 @@ class Api:
|
|
273
272
|
if metadata:
|
274
273
|
metadata.emit(
|
275
274
|
lambda t: triples.append({
|
276
|
-
"s": t
|
277
|
-
"p": t
|
278
|
-
"o": t
|
275
|
+
"s": { "v": t["s"], "e": isinstance(t["s"], Uri) },
|
276
|
+
"p": { "v": t["p"], "e": isinstance(t["p"], Uri) },
|
277
|
+
"o": { "v": t["o"], "e": isinstance(t["o"], Uri) }
|
279
278
|
})
|
280
279
|
)
|
281
280
|
|
@@ -312,9 +311,9 @@ class Api:
|
|
312
311
|
if metadata:
|
313
312
|
metadata.emit(
|
314
313
|
lambda t: triples.append({
|
315
|
-
"s": t
|
316
|
-
"p": t
|
317
|
-
"o": t
|
314
|
+
"s": { "v": t["s"], "e": isinstance(t["s"], Uri) },
|
315
|
+
"p": { "v": t["p"], "e": isinstance(t["p"], Uri) },
|
316
|
+
"o": { "v": t["o"], "e": isinstance(t["o"], Uri) }
|
318
317
|
})
|
319
318
|
)
|
320
319
|
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.16.8"
|
@@ -23,3 +23,11 @@ URL = 'https://schema.org/url'
|
|
23
23
|
IDENTIFIER = 'https://schema.org/identifier'
|
24
24
|
KEYWORD = 'https://schema.org/keywords'
|
25
25
|
|
26
|
+
class Uri(str):
|
27
|
+
def is_uri(self): return True
|
28
|
+
def is_literal(self): return False
|
29
|
+
|
30
|
+
class Literal(str):
|
31
|
+
def is_uri(self): return False
|
32
|
+
def is_literal(self): return True
|
33
|
+
|
@@ -1,6 +1,16 @@
|
|
1
1
|
|
2
2
|
from . defs import *
|
3
|
-
|
3
|
+
|
4
|
+
def Value(value, is_uri):
|
5
|
+
if is_uri:
|
6
|
+
return Uri(value)
|
7
|
+
else:
|
8
|
+
return Literal(value)
|
9
|
+
|
10
|
+
def Triple(s, p, o):
|
11
|
+
return {
|
12
|
+
"s": s, "p": p, "o": o,
|
13
|
+
}
|
4
14
|
|
5
15
|
class DigitalDocument:
|
6
16
|
|
@@ -1,6 +1,16 @@
|
|
1
1
|
|
2
2
|
from . defs import *
|
3
|
-
|
3
|
+
|
4
|
+
def Value(value, is_uri):
|
5
|
+
if is_uri:
|
6
|
+
return Uri(value)
|
7
|
+
else:
|
8
|
+
return Literal(value)
|
9
|
+
|
10
|
+
def Triple(s, p, o):
|
11
|
+
return {
|
12
|
+
"s": s, "p": p, "o": o,
|
13
|
+
}
|
4
14
|
|
5
15
|
class Organization:
|
6
16
|
def __init__(self, id, name=None, description=None):
|
@@ -1,6 +1,16 @@
|
|
1
1
|
|
2
2
|
from . defs import *
|
3
|
-
|
3
|
+
|
4
|
+
def Value(value, is_uri):
|
5
|
+
if is_uri:
|
6
|
+
return Uri(value)
|
7
|
+
else:
|
8
|
+
return Literal(value)
|
9
|
+
|
10
|
+
def Triple(s, p, o):
|
11
|
+
return {
|
12
|
+
"s": s, "p": p, "o": o,
|
13
|
+
}
|
4
14
|
|
5
15
|
class PublicationEvent:
|
6
16
|
def __init__(
|
@@ -1,12 +1,12 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-base
|
3
|
-
Version: 0.16.
|
3
|
+
Version: 0.16.8
|
4
4
|
Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
|
5
5
|
Home-page: https://github.com/trustgraph-ai/trustgraph
|
6
6
|
Author: trustgraph.ai
|
7
7
|
Author-email: security@trustgraph.ai
|
8
8
|
License: UNKNOWN
|
9
|
-
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.16.
|
9
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.16.8.tar.gz
|
10
10
|
Platform: UNKNOWN
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
12
12
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.16.6"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/clients/document_embeddings_client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/clients/graph_embeddings_client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph/clients/triples_query_client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-base-0.16.6 → trustgraph-base-0.16.8}/trustgraph_base.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|