streamlit-octostar-utils 0.5.0.dev17__tar.gz → 0.5.0.dev18__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 (45) hide show
  1. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/PKG-INFO +1 -1
  2. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/pyproject.toml +1 -1
  3. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/api_crafter/celery.py +13 -1
  4. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/api_crafter/nifi.py +25 -10
  5. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/LICENSE +0 -0
  6. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/README.md +0 -0
  7. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/__init__.py +0 -0
  8. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/api_crafter/__init__.py +0 -0
  9. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/api_crafter/contents.py +0 -0
  10. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/api_crafter/fastapi.py +0 -0
  11. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/api_crafter/parallelism.py +0 -0
  12. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/api_crafter/parser/__init__.py +0 -0
  13. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/api_crafter/parser/combine_fields.py +0 -0
  14. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/api_crafter/parser/entities_parser.py +0 -0
  15. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/api_crafter/parser/generics.py +0 -0
  16. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/api_crafter/parser/info.py +0 -0
  17. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/api_crafter/parser/linkchart_functions.py +0 -0
  18. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/api_crafter/parser/matches.py +0 -0
  19. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/api_crafter/parser/parameters.py +0 -0
  20. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/api_crafter/parser/rules.py +0 -0
  21. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/api_crafter/parser/signals.py +0 -0
  22. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/core/__init__.py +0 -0
  23. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/core/dict.py +0 -0
  24. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/core/filetypes.py +0 -0
  25. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/core/threading/__init__.py +0 -0
  26. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/core/threading/key_queue.py +0 -0
  27. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/core/timestamp.py +0 -0
  28. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/nlp/__init__.py +0 -0
  29. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/nlp/custom_recognizers.py +0 -0
  30. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/nlp/language.py +0 -0
  31. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/nlp/ner.py +0 -0
  32. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/octostar/__init__.py +0 -0
  33. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/octostar/client.py +0 -0
  34. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/octostar/context.py +0 -0
  35. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/octostar/permissions.py +0 -0
  36. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/ontology/__init__.py +0 -0
  37. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/ontology/inheritance.py +0 -0
  38. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/ontology/relationships.py +0 -0
  39. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/ontology/validation.py +0 -0
  40. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/style/__init__.py +0 -0
  41. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/style/common.py +0 -0
  42. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/threading/__init__.py +0 -0
  43. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/threading/async_task_manager.py +0 -0
  44. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/threading/session_callback_manager.py +0 -0
  45. {streamlit_octostar_utils-0.5.0.dev17 → streamlit_octostar_utils-0.5.0.dev18}/streamlit_octostar_utils/threading/session_state_hot_swapper.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streamlit-octostar-utils
3
- Version: 0.5.0.dev17
3
+ Version: 0.5.0.dev18
4
4
  Summary:
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -5,7 +5,7 @@ include = '\.pyi?$'
5
5
 
6
6
  [tool.poetry]
7
7
  name = "streamlit-octostar-utils"
8
- version = "0.5.0-dev.17"
8
+ version = "0.5.0-dev.18"
9
9
  description = ""
10
10
  license = "MIT"
11
11
  authors = ["Octostar"]
@@ -983,6 +983,11 @@ class FastAPICeleryTaskRoute(Route):
983
983
  path="/task/{task_id}",
984
984
  methods=["DELETE"],
985
985
  summary="Cancel a queued or running task.",
986
+ description=(
987
+ "Terminate a task by its ID. If the task is still queued "
988
+ "(AWAITING) it is revoked; if it is running (STARTED) the "
989
+ "worker process is interrupted."
990
+ ),
986
991
  status_code=200,
987
992
  responses=DefaultErrorRoute.error_responses,
988
993
  )
@@ -995,7 +1000,14 @@ class FastAPICeleryTaskRoute(Route):
995
1000
  self,
996
1001
  path="/task/{task_id}",
997
1002
  methods=["GET"],
998
- summary="Get task status (and result if available).",
1003
+ summary="Get task status, progress, and result.",
1004
+ description=(
1005
+ "Poll a running or completed task. Returns task_state "
1006
+ "(AWAITING, STARTED, SUCCESS, FAILURE, etc.), and when "
1007
+ "STARTED may include a 'progress' dict with task-specific "
1008
+ "metrics (e.g. nodes_done / nodes_total). When SUCCESS, "
1009
+ "the 'data' field contains the task result."
1010
+ ),
999
1011
  status_code=200,
1000
1012
  responses=DefaultErrorRoute.error_responses,
1001
1013
  )
@@ -1526,7 +1526,12 @@ class NifiRoute(Route):
1526
1526
  self.endpoints[op.strip("/")] = nifi_task
1527
1527
 
1528
1528
  def define_routes(self):
1529
- @Route.route(self, path="/task-state/{task_id}")
1529
+ @Route.route(
1530
+ self,
1531
+ path="/task-state/{task_id}",
1532
+ summary="Get NiFi task state.",
1533
+ description="Return the current state of a task as a plain string (e.g. AWAITING, STARTED, SUCCESS).",
1534
+ )
1530
1535
  async def get_task_status(task_id: str) -> JSONResponse:
1531
1536
  try:
1532
1537
  task_status = await self.tasks_routes.get_task(task_id, pop=False)
@@ -1535,7 +1540,12 @@ class NifiRoute(Route):
1535
1540
  raise ValueError(f"Could not fetch task state for task id {task_id}!\n{e}")
1536
1541
  return JSONResponse(task_status)
1537
1542
 
1538
- @Route.route(self, path="/task-result/{task_id}")
1543
+ @Route.route(
1544
+ self,
1545
+ path="/task-result/{task_id}",
1546
+ summary="Get NiFi task result.",
1547
+ description="Return the result payload of a completed task and remove it from the backend.",
1548
+ )
1539
1549
  async def get_task_result(task_id: str) -> JSONResponse:
1540
1550
  try:
1541
1551
  return_data = await self.tasks_routes.get_task(task_id, pop=True)
@@ -1544,15 +1554,20 @@ class NifiRoute(Route):
1544
1554
  raise ValueError(f"Could not fetch task result for task id {task_id}\n{e}!")
1545
1555
  return JSONResponse(return_data)
1546
1556
 
1547
- @Route.route(self, path="/{op}", methods=["POST"])
1557
+ @Route.route(
1558
+ self,
1559
+ path="/{op}",
1560
+ methods=["POST"],
1561
+ summary="Submit a NiFi processing task.",
1562
+ description=(
1563
+ "Entry point for NiFi requests. The 'op' path parameter "
1564
+ "selects the processing route (e.g. extract-text, summarize). "
1565
+ "The body is a list of entities in NiFi format. Query "
1566
+ "parameters are read from the entity config at "
1567
+ "'request.config.<<processor_name>>.<<route_name>>.<<suffix_name>>'."
1568
+ ),
1569
+ )
1548
1570
  async def send_task(op: str, request: Request) -> str:
1549
- """
1550
- Any request coming from Nifi should enter from here.
1551
- Note that:
1552
- - The **op** parameter should be any of the other endpoints, including path parameters
1553
- - The body parameters should be a list of entities in Nifi format, which also replace form parameters
1554
- - The query parameters should be set in the 'request.config.<<processor_name>>.<<route_name>>.<<suffix_name>>' entry of the entities
1555
- """
1556
1571
  path_params = []
1557
1572
  op = op.split("/")
1558
1573
  if len(op) > 1: