trustgraph-cli 2.1.2__tar.gz → 2.1.3__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_cli-2.1.2 → trustgraph_cli-2.1.3}/PKG-INFO +1 -1
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/graph_to_turtle.py +30 -12
- trustgraph_cli-2.1.3/trustgraph/cli_version.py +1 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph_cli.egg-info/PKG-INFO +1 -1
- trustgraph_cli-2.1.2/trustgraph/cli_version.py +0 -1
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/README.md +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/pyproject.toml +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/setup.cfg +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/__init__.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/add_library_document.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/delete_collection.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/delete_config_item.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/delete_flow_blueprint.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/delete_kg_core.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/delete_mcp_tool.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/delete_tool.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/dump_msgpack.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/dump_queues.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/get_config_item.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/get_flow_blueprint.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/get_kg_core.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/init_pulsar_manager.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/init_trustgraph.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/invoke_agent.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/invoke_document_embeddings.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/invoke_document_rag.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/invoke_embeddings.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/invoke_graph_embeddings.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/invoke_graph_rag.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/invoke_llm.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/invoke_mcp_tool.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/invoke_nlp_query.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/invoke_prompt.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/invoke_row_embeddings.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/invoke_rows_query.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/invoke_structured_query.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/list_collections.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/list_config_items.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/load_doc_embeds.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/load_kg_core.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/load_knowledge.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/load_sample_documents.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/load_structured_data.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/load_turtle.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/put_config_item.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/put_flow_blueprint.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/put_kg_core.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/remove_library_document.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/save_doc_embeds.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/set_collection.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/set_mcp_tool.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/set_prompt.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/set_token_costs.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/set_tool.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/show_config.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/show_flow_blueprints.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/show_flow_state.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/show_flows.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/show_graph.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/show_kg_cores.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/show_library_documents.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/show_library_processing.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/show_mcp_tools.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/show_parameter_types.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/show_processor_state.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/show_prompts.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/show_token_costs.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/show_token_rate.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/show_tools.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/start_flow.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/start_library_processing.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/stop_flow.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/stop_library_processing.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/unload_kg_core.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph/cli/verify_system_status.py +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph_cli.egg-info/SOURCES.txt +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph_cli.egg-info/dependency_links.txt +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph_cli.egg-info/entry_points.txt +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph_cli.egg-info/requires.txt +0 -0
- {trustgraph_cli-2.1.2 → trustgraph_cli-2.1.3}/trustgraph_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trustgraph-cli
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.3
|
|
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
|
Author-email: "trustgraph.ai" <security@trustgraph.ai>
|
|
6
6
|
Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""
|
|
2
2
|
Connects to the graph query service and dumps all graph edges in Turtle
|
|
3
|
-
format.
|
|
3
|
+
format with RDF-star support for quoted triples.
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
6
|
import rdflib
|
|
@@ -10,11 +10,37 @@ import argparse
|
|
|
10
10
|
import os
|
|
11
11
|
|
|
12
12
|
from trustgraph.api import Api, Uri
|
|
13
|
+
from trustgraph.knowledge import QuotedTriple
|
|
13
14
|
|
|
14
15
|
default_url = os.getenv("TRUSTGRAPH_URL", 'http://localhost:8088/')
|
|
15
16
|
default_user = 'trustgraph'
|
|
16
17
|
default_collection = 'default'
|
|
17
18
|
|
|
19
|
+
|
|
20
|
+
def value_to_rdflib(val):
|
|
21
|
+
"""Convert a TrustGraph value to an rdflib term."""
|
|
22
|
+
if isinstance(val, Uri):
|
|
23
|
+
# Skip malformed URLs with spaces
|
|
24
|
+
if " " in val:
|
|
25
|
+
return None
|
|
26
|
+
return rdflib.term.URIRef(val)
|
|
27
|
+
elif isinstance(val, QuotedTriple):
|
|
28
|
+
# RDF-star quoted triple
|
|
29
|
+
s_term = value_to_rdflib(val.s)
|
|
30
|
+
p_term = value_to_rdflib(val.p)
|
|
31
|
+
o_term = value_to_rdflib(val.o)
|
|
32
|
+
if s_term is None or p_term is None or o_term is None:
|
|
33
|
+
return None
|
|
34
|
+
# rdflib 6.x+ supports Triple as a term type
|
|
35
|
+
try:
|
|
36
|
+
return rdflib.term.Triple((s_term, p_term, o_term))
|
|
37
|
+
except AttributeError:
|
|
38
|
+
# Fallback for older rdflib versions - represent as string
|
|
39
|
+
return rdflib.term.Literal(f"<<{val.s} {val.p} {val.o}>>")
|
|
40
|
+
else:
|
|
41
|
+
return rdflib.term.Literal(str(val))
|
|
42
|
+
|
|
43
|
+
|
|
18
44
|
def show_graph(url, flow_id, user, collection):
|
|
19
45
|
|
|
20
46
|
api = Api(url).flow().id(flow_id)
|
|
@@ -30,18 +56,10 @@ def show_graph(url, flow_id, user, collection):
|
|
|
30
56
|
|
|
31
57
|
sv = rdflib.term.URIRef(row.s)
|
|
32
58
|
pv = rdflib.term.URIRef(row.p)
|
|
59
|
+
ov = value_to_rdflib(row.o)
|
|
33
60
|
|
|
34
|
-
if
|
|
35
|
-
|
|
36
|
-
# Skip malformed URLs with spaces in
|
|
37
|
-
if " " in row.o:
|
|
38
|
-
continue
|
|
39
|
-
|
|
40
|
-
ov = rdflib.term.URIRef(row.o)
|
|
41
|
-
|
|
42
|
-
else:
|
|
43
|
-
|
|
44
|
-
ov = rdflib.term.Literal(row.o)
|
|
61
|
+
if ov is None:
|
|
62
|
+
continue
|
|
45
63
|
|
|
46
64
|
g.add((sv, pv, ov))
|
|
47
65
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.1.3"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trustgraph-cli
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.3
|
|
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
|
Author-email: "trustgraph.ai" <security@trustgraph.ai>
|
|
6
6
|
Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.1.2"
|
|
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
|
|
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
|
|
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
|
|
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
|