Praxos-python 0.3.2__tar.gz → 0.3.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.
Files changed (19) hide show
  1. {praxos_python-0.3.2 → praxos_python-0.3.3}/.gitignore +3 -1
  2. {praxos_python-0.3.2 → praxos_python-0.3.3}/PKG-INFO +1 -1
  3. {praxos_python-0.3.2 → praxos_python-0.3.3}/pyproject.toml +1 -1
  4. {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/models/environment.py +22 -0
  5. {praxos_python-0.3.2 → praxos_python-0.3.3}/INSTALL.md +0 -0
  6. {praxos_python-0.3.2 → praxos_python-0.3.3}/LICENSE +0 -0
  7. {praxos_python-0.3.2 → praxos_python-0.3.3}/README.md +0 -0
  8. {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/__init__.py +0 -0
  9. {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/client.py +0 -0
  10. {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/config.py +0 -0
  11. {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/exceptions.py +0 -0
  12. {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/models/__init__.py +0 -0
  13. {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/models/context.py +0 -0
  14. {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/models/ontology.py +0 -0
  15. {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/models/source.py +0 -0
  16. {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/types/__init__.py +0 -0
  17. {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/types/message.py +0 -0
  18. {praxos_python-0.3.2 → praxos_python-0.3.3}/src/praxos_python/utils.py +0 -0
  19. {praxos_python-0.3.2 → praxos_python-0.3.3}/test_intelligent_search.py +0 -0
@@ -174,4 +174,6 @@ cython_debug/
174
174
  .pypirc
175
175
 
176
176
  .vscode/
177
- tests/*
177
+ tests/*
178
+ src/.DS_Store
179
+ */.DS_Store
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Praxos-python
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Python SDK for Praxos with Intelligent Search
5
5
  Author-email: Masoud Kermani Poor <masoud@praxos.ai>, Soheil Sadabadi <soheil@praxos.ai>
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "Praxos-python"
3
- version = "0.3.2"
3
+ version = "0.3.3"
4
4
  description = "Python SDK for Praxos with Intelligent Search"
5
5
  authors = [{ name = "Masoud Kermani Poor", email = "masoud@praxos.ai" }, {name = "Soheil Sadabadi", email = "soheil@praxos.ai"}]
6
6
  readme = "README.md"
@@ -676,6 +676,28 @@ class SyncEnvironment(BaseEnvironmentAttributes):
676
676
  json_data=payload
677
677
  )
678
678
  return SyncSource(client=self._client, **response_data)
679
+
680
+ def enrich(self, node_ids: Union[str, List[str]], k: int = 2) -> Dict[str, Any]:
681
+ """
682
+ Enriches a given node or list of nodes by finding the closest entity and retrieving all entities up to k hops away.
683
+
684
+ Args:
685
+ node_ids: A single node ID or a list of node IDs to enrich.
686
+ k: The number of hops to traverse for enrichment.
687
+
688
+ Returns:
689
+ A dictionary containing the enriched data for each node.
690
+ """
691
+ if not node_ids:
692
+ raise ValueError("node_ids cannot be empty")
693
+
694
+ payload = {
695
+ "node_ids": node_ids,
696
+ "k": k,
697
+ }
698
+
699
+ response_data = self._client._request("POST", "/enrich", json_data=payload)
700
+ return response_data
679
701
 
680
702
  def get_sources(self) -> List[SyncSource]:
681
703
  """Gets all sources for the environment."""
File without changes
File without changes
File without changes