trustgraph-cli 1.4.5__tar.gz → 1.4.7__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.

Potentially problematic release.


This version of trustgraph-cli might be problematic. Click here for more details.

Files changed (75) hide show
  1. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/PKG-INFO +1 -1
  2. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/pyproject.toml +3 -0
  3. trustgraph_cli-1.4.7/trustgraph/cli/delete_collection.py +72 -0
  4. trustgraph_cli-1.4.7/trustgraph/cli/list_collections.py +85 -0
  5. trustgraph_cli-1.4.7/trustgraph/cli/update_collection.py +103 -0
  6. trustgraph_cli-1.4.7/trustgraph/cli_version.py +1 -0
  7. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph_cli.egg-info/PKG-INFO +1 -1
  8. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph_cli.egg-info/SOURCES.txt +3 -0
  9. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph_cli.egg-info/entry_points.txt +3 -0
  10. trustgraph_cli-1.4.5/trustgraph/cli_version.py +0 -1
  11. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/README.md +0 -0
  12. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/setup.cfg +0 -0
  13. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/__init__.py +0 -0
  14. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/add_library_document.py +0 -0
  15. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/delete_config_item.py +0 -0
  16. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/delete_flow_class.py +0 -0
  17. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/delete_kg_core.py +0 -0
  18. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/delete_mcp_tool.py +0 -0
  19. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/delete_tool.py +0 -0
  20. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/dump_msgpack.py +0 -0
  21. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/get_config_item.py +0 -0
  22. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/get_flow_class.py +0 -0
  23. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/get_kg_core.py +0 -0
  24. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/graph_to_turtle.py +0 -0
  25. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/init_pulsar_manager.py +0 -0
  26. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/init_trustgraph.py +0 -0
  27. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/invoke_agent.py +0 -0
  28. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/invoke_document_rag.py +0 -0
  29. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/invoke_graph_rag.py +0 -0
  30. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/invoke_llm.py +0 -0
  31. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/invoke_mcp_tool.py +0 -0
  32. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/invoke_nlp_query.py +0 -0
  33. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/invoke_objects_query.py +0 -0
  34. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/invoke_prompt.py +0 -0
  35. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/invoke_structured_query.py +0 -0
  36. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/list_config_items.py +0 -0
  37. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/load_doc_embeds.py +0 -0
  38. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/load_kg_core.py +0 -0
  39. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/load_knowledge.py +0 -0
  40. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/load_pdf.py +0 -0
  41. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/load_sample_documents.py +0 -0
  42. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/load_structured_data.py +0 -0
  43. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/load_text.py +0 -0
  44. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/load_turtle.py +0 -0
  45. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/put_config_item.py +0 -0
  46. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/put_flow_class.py +0 -0
  47. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/put_kg_core.py +0 -0
  48. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/remove_library_document.py +0 -0
  49. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/save_doc_embeds.py +0 -0
  50. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/set_mcp_tool.py +0 -0
  51. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/set_prompt.py +0 -0
  52. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/set_token_costs.py +0 -0
  53. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/set_tool.py +0 -0
  54. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/show_config.py +0 -0
  55. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/show_flow_classes.py +0 -0
  56. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/show_flow_state.py +0 -0
  57. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/show_flows.py +0 -0
  58. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/show_graph.py +0 -0
  59. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/show_kg_cores.py +0 -0
  60. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/show_library_documents.py +0 -0
  61. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/show_library_processing.py +0 -0
  62. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/show_mcp_tools.py +0 -0
  63. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/show_processor_state.py +0 -0
  64. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/show_prompts.py +0 -0
  65. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/show_token_costs.py +0 -0
  66. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/show_token_rate.py +0 -0
  67. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/show_tools.py +0 -0
  68. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/start_flow.py +0 -0
  69. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/start_library_processing.py +0 -0
  70. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/stop_flow.py +0 -0
  71. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/stop_library_processing.py +0 -0
  72. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph/cli/unload_kg_core.py +0 -0
  73. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph_cli.egg-info/dependency_links.txt +0 -0
  74. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/trustgraph_cli.egg-info/requires.txt +0 -0
  75. {trustgraph_cli-1.4.5 → trustgraph_cli-1.4.7}/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: 1.4.5
3
+ Version: 1.4.7
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
@@ -86,6 +86,9 @@ tg-list-config-items = "trustgraph.cli.list_config_items:main"
86
86
  tg-get-config-item = "trustgraph.cli.get_config_item:main"
87
87
  tg-put-config-item = "trustgraph.cli.put_config_item:main"
88
88
  tg-delete-config-item = "trustgraph.cli.delete_config_item:main"
89
+ tg-list-collections = "trustgraph.cli.list_collections:main"
90
+ tg-update-collection = "trustgraph.cli.update_collection:main"
91
+ tg-delete-collection = "trustgraph.cli.delete_collection:main"
89
92
 
90
93
  [tool.setuptools.packages.find]
91
94
  include = ["trustgraph*"]
@@ -0,0 +1,72 @@
1
+ """
2
+ Delete a collection and all its data
3
+ """
4
+
5
+ import argparse
6
+ import os
7
+ from trustgraph.api import Api
8
+
9
+ default_url = os.getenv("TRUSTGRAPH_URL", 'http://localhost:8088/')
10
+ default_user = "trustgraph"
11
+
12
+ def delete_collection(url, user, collection, confirm):
13
+
14
+ if not confirm:
15
+ response = input(f"Are you sure you want to delete collection '{collection}' and all its data? (y/N): ")
16
+ if response.lower() not in ['y', 'yes']:
17
+ print("Operation cancelled.")
18
+ return
19
+
20
+ api = Api(url).collection()
21
+
22
+ api.delete_collection(user=user, collection=collection)
23
+
24
+ print(f"Collection '{collection}' deleted successfully.")
25
+
26
+ def main():
27
+
28
+ parser = argparse.ArgumentParser(
29
+ prog='tg-delete-collection',
30
+ description=__doc__,
31
+ )
32
+
33
+ parser.add_argument(
34
+ 'collection',
35
+ help='Collection ID to delete'
36
+ )
37
+
38
+ parser.add_argument(
39
+ '-u', '--api-url',
40
+ default=default_url,
41
+ help=f'API URL (default: {default_url})',
42
+ )
43
+
44
+ parser.add_argument(
45
+ '-U', '--user',
46
+ default=default_user,
47
+ help=f'User ID (default: {default_user})'
48
+ )
49
+
50
+ parser.add_argument(
51
+ '-y', '--yes',
52
+ action='store_true',
53
+ help='Skip confirmation prompt'
54
+ )
55
+
56
+ args = parser.parse_args()
57
+
58
+ try:
59
+
60
+ delete_collection(
61
+ url = args.api_url,
62
+ user = args.user,
63
+ collection = args.collection,
64
+ confirm = args.yes
65
+ )
66
+
67
+ except Exception as e:
68
+
69
+ print("Exception:", e, flush=True)
70
+
71
+ if __name__ == "__main__":
72
+ main()
@@ -0,0 +1,85 @@
1
+ """
2
+ List collections for a user
3
+ """
4
+
5
+ import argparse
6
+ import os
7
+ import tabulate
8
+ from trustgraph.api import Api
9
+ import json
10
+
11
+ default_url = os.getenv("TRUSTGRAPH_URL", 'http://localhost:8088/')
12
+ default_user = "trustgraph"
13
+
14
+ def list_collections(url, user, tag_filter):
15
+
16
+ api = Api(url).collection()
17
+
18
+ collections = api.list_collections(user=user, tag_filter=tag_filter)
19
+
20
+ if len(collections) == 0:
21
+ print("No collections.")
22
+ return
23
+
24
+ table = []
25
+ for collection in collections:
26
+ table.append([
27
+ collection.collection,
28
+ collection.name,
29
+ collection.description,
30
+ ", ".join(collection.tags),
31
+ collection.created_at,
32
+ collection.updated_at
33
+ ])
34
+
35
+ headers = ["Collection", "Name", "Description", "Tags", "Created", "Updated"]
36
+
37
+ print(tabulate.tabulate(
38
+ table,
39
+ headers=headers,
40
+ tablefmt="pretty",
41
+ stralign="left",
42
+ maxcolwidths=[20, 30, 50, 30, 19, 19],
43
+ ))
44
+
45
+ def main():
46
+
47
+ parser = argparse.ArgumentParser(
48
+ prog='tg-list-collections',
49
+ description=__doc__,
50
+ )
51
+
52
+ parser.add_argument(
53
+ '-u', '--api-url',
54
+ default=default_url,
55
+ help=f'API URL (default: {default_url})',
56
+ )
57
+
58
+ parser.add_argument(
59
+ '-U', '--user',
60
+ default=default_user,
61
+ help=f'User ID (default: {default_user})'
62
+ )
63
+
64
+ parser.add_argument(
65
+ '-t', '--tag-filter',
66
+ action='append',
67
+ help='Filter by tags (can be specified multiple times)'
68
+ )
69
+
70
+ args = parser.parse_args()
71
+
72
+ try:
73
+
74
+ list_collections(
75
+ url = args.api_url,
76
+ user = args.user,
77
+ tag_filter = args.tag_filter
78
+ )
79
+
80
+ except Exception as e:
81
+
82
+ print("Exception:", e, flush=True)
83
+
84
+ if __name__ == "__main__":
85
+ main()
@@ -0,0 +1,103 @@
1
+ """
2
+ Update collection metadata
3
+ """
4
+
5
+ import argparse
6
+ import os
7
+ import tabulate
8
+ from trustgraph.api import Api
9
+
10
+ default_url = os.getenv("TRUSTGRAPH_URL", 'http://localhost:8088/')
11
+ default_user = "trustgraph"
12
+
13
+ def update_collection(url, user, collection, name, description, tags):
14
+
15
+ api = Api(url).collection()
16
+
17
+ result = api.update_collection(
18
+ user=user,
19
+ collection=collection,
20
+ name=name,
21
+ description=description,
22
+ tags=tags
23
+ )
24
+
25
+ if result:
26
+ print(f"Collection '{collection}' updated successfully.")
27
+
28
+ table = []
29
+ table.append(("Collection", result.collection))
30
+ table.append(("Name", result.name))
31
+ table.append(("Description", result.description))
32
+ table.append(("Tags", ", ".join(result.tags)))
33
+ table.append(("Updated", result.updated_at))
34
+
35
+ print(tabulate.tabulate(
36
+ table,
37
+ tablefmt="pretty",
38
+ stralign="left",
39
+ maxcolwidths=[None, 67],
40
+ ))
41
+ else:
42
+ print(f"Failed to update collection '{collection}'.")
43
+
44
+ def main():
45
+
46
+ parser = argparse.ArgumentParser(
47
+ prog='tg-update-collection',
48
+ description=__doc__,
49
+ )
50
+
51
+ parser.add_argument(
52
+ 'collection',
53
+ help='Collection ID to update'
54
+ )
55
+
56
+ parser.add_argument(
57
+ '-u', '--api-url',
58
+ default=default_url,
59
+ help=f'API URL (default: {default_url})',
60
+ )
61
+
62
+ parser.add_argument(
63
+ '-U', '--user',
64
+ default=default_user,
65
+ help=f'User ID (default: {default_user})'
66
+ )
67
+
68
+ parser.add_argument(
69
+ '-n', '--name',
70
+ help='Collection name'
71
+ )
72
+
73
+ parser.add_argument(
74
+ '-d', '--description',
75
+ help='Collection description'
76
+ )
77
+
78
+ parser.add_argument(
79
+ '-t', '--tag',
80
+ action='append',
81
+ dest='tags',
82
+ help='Collection tags (can be specified multiple times)'
83
+ )
84
+
85
+ args = parser.parse_args()
86
+
87
+ try:
88
+
89
+ update_collection(
90
+ url = args.api_url,
91
+ user = args.user,
92
+ collection = args.collection,
93
+ name = args.name,
94
+ description = args.description,
95
+ tags = args.tags
96
+ )
97
+
98
+ except Exception as e:
99
+
100
+ print("Exception:", e, flush=True)
101
+
102
+ if __name__ == "__main__":
103
+ main()
@@ -0,0 +1 @@
1
+ __version__ = "1.4.7"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trustgraph-cli
3
- Version: 1.4.5
3
+ Version: 1.4.7
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
@@ -3,6 +3,7 @@ pyproject.toml
3
3
  trustgraph/cli_version.py
4
4
  trustgraph/cli/__init__.py
5
5
  trustgraph/cli/add_library_document.py
6
+ trustgraph/cli/delete_collection.py
6
7
  trustgraph/cli/delete_config_item.py
7
8
  trustgraph/cli/delete_flow_class.py
8
9
  trustgraph/cli/delete_kg_core.py
@@ -24,6 +25,7 @@ trustgraph/cli/invoke_nlp_query.py
24
25
  trustgraph/cli/invoke_objects_query.py
25
26
  trustgraph/cli/invoke_prompt.py
26
27
  trustgraph/cli/invoke_structured_query.py
28
+ trustgraph/cli/list_collections.py
27
29
  trustgraph/cli/list_config_items.py
28
30
  trustgraph/cli/load_doc_embeds.py
29
31
  trustgraph/cli/load_kg_core.py
@@ -61,6 +63,7 @@ trustgraph/cli/start_library_processing.py
61
63
  trustgraph/cli/stop_flow.py
62
64
  trustgraph/cli/stop_library_processing.py
63
65
  trustgraph/cli/unload_kg_core.py
66
+ trustgraph/cli/update_collection.py
64
67
  trustgraph_cli.egg-info/PKG-INFO
65
68
  trustgraph_cli.egg-info/SOURCES.txt
66
69
  trustgraph_cli.egg-info/dependency_links.txt
@@ -1,5 +1,6 @@
1
1
  [console_scripts]
2
2
  tg-add-library-document = trustgraph.cli.add_library_document:main
3
+ tg-delete-collection = trustgraph.cli.delete_collection:main
3
4
  tg-delete-config-item = trustgraph.cli.delete_config_item:main
4
5
  tg-delete-flow-class = trustgraph.cli.delete_flow_class:main
5
6
  tg-delete-kg-core = trustgraph.cli.delete_kg_core:main
@@ -20,6 +21,7 @@ tg-invoke-nlp-query = trustgraph.cli.invoke_nlp_query:main
20
21
  tg-invoke-objects-query = trustgraph.cli.invoke_objects_query:main
21
22
  tg-invoke-prompt = trustgraph.cli.invoke_prompt:main
22
23
  tg-invoke-structured-query = trustgraph.cli.invoke_structured_query:main
24
+ tg-list-collections = trustgraph.cli.list_collections:main
23
25
  tg-list-config-items = trustgraph.cli.list_config_items:main
24
26
  tg-load-doc-embeds = trustgraph.cli.load_doc_embeds:main
25
27
  tg-load-kg-core = trustgraph.cli.load_kg_core:main
@@ -57,3 +59,4 @@ tg-start-library-processing = trustgraph.cli.start_library_processing:main
57
59
  tg-stop-flow = trustgraph.cli.stop_flow:main
58
60
  tg-stop-library-processing = trustgraph.cli.stop_library_processing:main
59
61
  tg-unload-kg-core = trustgraph.cli.unload_kg_core:main
62
+ tg-update-collection = trustgraph.cli.update_collection:main
@@ -1 +0,0 @@
1
- __version__ = "1.4.5"
File without changes
File without changes