hatchet-sdk 1.17.1__py3-none-any.whl → 1.17.2__py3-none-any.whl

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 hatchet-sdk might be problematic. Click here for more details.

@@ -1406,6 +1406,7 @@ class Standalone(BaseWorkflow[TWorkflowInput], Generic[TWorkflowInput, R]):
1406
1406
  parent_outputs: dict[str, JSONSerializableMapping] | None = None,
1407
1407
  retry_count: int = 0,
1408
1408
  lifespan: Any = None,
1409
+ dependencies: dict[str, Any] | None = None,
1409
1410
  ) -> R:
1410
1411
  """
1411
1412
  Mimic the execution of a task. This method is intended to be used to unit test
@@ -1417,6 +1418,7 @@ class Standalone(BaseWorkflow[TWorkflowInput], Generic[TWorkflowInput, R]):
1417
1418
  :param parent_outputs: Outputs from parent tasks, if any. This is useful for mimicking DAG functionality. For instance, if you have a task `step_2` that has a `parent` which is `step_1`, you can pass `parent_outputs={"step_1": {"result": "Hello, world!"}}` to `step_2.mock_run()` to be able to access `ctx.task_output(step_1)` in `step_2`.
1418
1419
  :param retry_count: The number of times the task has been retried.
1419
1420
  :param lifespan: The lifespan to be used in the task, which is useful if one was set on the worker. This will allow you to access `ctx.lifespan` inside of your task.
1421
+ :param dependencies: Dependencies to be injected into the task. This is useful for tasks that have dependencies defined using `Depends`. **IMPORTANT**: You must pass the dependencies _directly_, **not** the `Depends` objects themselves. For example, if you have a task that has a dependency `config: Annotated[str, Depends(get_config)]`, you should pass `dependencies={"config": "config_value"}` to `aio_mock_run`.
1420
1422
 
1421
1423
  :return: The output of the task.
1422
1424
  """
@@ -1427,6 +1429,7 @@ class Standalone(BaseWorkflow[TWorkflowInput], Generic[TWorkflowInput, R]):
1427
1429
  parent_outputs=parent_outputs,
1428
1430
  retry_count=retry_count,
1429
1431
  lifespan=lifespan,
1432
+ dependencies=dependencies,
1430
1433
  )
1431
1434
 
1432
1435
  async def aio_mock_run(
@@ -1436,6 +1439,7 @@ class Standalone(BaseWorkflow[TWorkflowInput], Generic[TWorkflowInput, R]):
1436
1439
  parent_outputs: dict[str, JSONSerializableMapping] | None = None,
1437
1440
  retry_count: int = 0,
1438
1441
  lifespan: Any = None,
1442
+ dependencies: dict[str, Any] | None = None,
1439
1443
  ) -> R:
1440
1444
  """
1441
1445
  Mimic the execution of a task. This method is intended to be used to unit test
@@ -1447,6 +1451,7 @@ class Standalone(BaseWorkflow[TWorkflowInput], Generic[TWorkflowInput, R]):
1447
1451
  :param parent_outputs: Outputs from parent tasks, if any. This is useful for mimicking DAG functionality. For instance, if you have a task `step_2` that has a `parent` which is `step_1`, you can pass `parent_outputs={"step_1": {"result": "Hello, world!"}}` to `step_2.mock_run()` to be able to access `ctx.task_output(step_1)` in `step_2`.
1448
1452
  :param retry_count: The number of times the task has been retried.
1449
1453
  :param lifespan: The lifespan to be used in the task, which is useful if one was set on the worker. This will allow you to access `ctx.lifespan` inside of your task.
1454
+ :param dependencies: Dependencies to be injected into the task. This is useful for tasks that have dependencies defined using `Depends`. **IMPORTANT**: You must pass the dependencies _directly_, **not** the `Depends` objects themselves. For example, if you have a task that has a dependency `config: Annotated[str, Depends(get_config)]`, you should pass `dependencies={"config": "config_value"}` to `aio_mock_run`.
1450
1455
 
1451
1456
  :return: The output of the task.
1452
1457
  """
@@ -1457,6 +1462,7 @@ class Standalone(BaseWorkflow[TWorkflowInput], Generic[TWorkflowInput, R]):
1457
1462
  parent_outputs=parent_outputs,
1458
1463
  retry_count=retry_count,
1459
1464
  lifespan=lifespan,
1465
+ dependencies=dependencies,
1460
1466
  )
1461
1467
 
1462
1468
  @property
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hatchet-sdk
3
- Version: 1.17.1
3
+ Version: 1.17.2
4
4
  Summary:
5
5
  License: MIT
6
6
  Author: Alexander Belanger
@@ -12,9 +12,9 @@ Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
14
  Provides-Extra: otel
15
+ Provides-Extra: v0
15
16
  Requires-Dist: aiohttp (>=3.10.5,<4.0.0)
16
- Requires-Dist: aiohttp-retry (>=2.8.3,<3.0.0)
17
- Requires-Dist: aiostream (>=0.5.2,<0.6.0)
17
+ Requires-Dist: cel-python (>=0.4.0,<0.5.0) ; extra == "v0"
18
18
  Requires-Dist: grpcio (>=1.64.1,!=1.68.*) ; python_version < "3.13"
19
19
  Requires-Dist: grpcio (>=1.69.0) ; python_version >= "3.13"
20
20
  Requires-Dist: grpcio-tools (>=1.64.1,!=1.68.*) ; python_version < "3.13"
@@ -304,7 +304,7 @@ hatchet_sdk/runnables/action.py,sha256=zrVHpyzIQ9XZgWwY69b_6uhZd53An4trRoLd9b3os
304
304
  hatchet_sdk/runnables/contextvars.py,sha256=jHrrewUlFPAT9f2u3VCsuSlDBtBoagEUtUzJOSmm4yk,1118
305
305
  hatchet_sdk/runnables/task.py,sha256=JsiDBkYQVJodyqtNDT9z8Pwz3ePL8GhY0Z1-ptPw9ms,16030
306
306
  hatchet_sdk/runnables/types.py,sha256=M23xSMTBPl12CXCCXZ0wbnqZ_sePB6CJKtOdipiNDlg,4362
307
- hatchet_sdk/runnables/workflow.py,sha256=Nm71LrY_EcPJUrlzRuBh6sp7bv-pMrt0gQgZNftue9g,57848
307
+ hatchet_sdk/runnables/workflow.py,sha256=-oz0q76N-NAi3Xon1VXkzDvZe0ZjbXR_O-3sTCGfokk,58876
308
308
  hatchet_sdk/token.py,sha256=KjIiInwG5Kqd_FO4BSW1x_5Uc7PFbnzIVJqr50-ZldE,779
309
309
  hatchet_sdk/utils/aio.py,sha256=cu1rD_UZkShtfzi7iXMYwBBaCRdxJQTdUC0_mf8nU2E,499
310
310
  hatchet_sdk/utils/backoff.py,sha256=6B5Rb5nLKw_TqqgpJMYjIBV1PTTtbOMRZCveisVhg_I,353
@@ -542,7 +542,7 @@ hatchet_sdk/worker/runner/runner.py,sha256=QULD00hEyW2dcHCcH46C1k7mxr5nHEwtusyAs
542
542
  hatchet_sdk/worker/runner/utils/capture_logs.py,sha256=hNELuNHS0HmoMZJ7F7yIjZuahPEx9cOx9JZro618W74,4675
543
543
  hatchet_sdk/worker/worker.py,sha256=9EiESMMcS7voa4cAnmnHMx4rC-pqaTmP74bcTbFPqfQ,16435
544
544
  hatchet_sdk/workflow_run.py,sha256=KcylcqRwKADtnzOTjoiVr1vdr7qTZFtDeD5aRS6A4Y8,2823
545
- hatchet_sdk-1.17.1.dist-info/METADATA,sha256=Jq0SedvsRiVyJAhdF8JN_vyc-LjfOTeh-xJvC1MnNsM,3585
546
- hatchet_sdk-1.17.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
547
- hatchet_sdk-1.17.1.dist-info/entry_points.txt,sha256=Un_76pcLse-ZGBlwebhQpnTPyQrripeHW8J7qmEpGOk,1400
548
- hatchet_sdk-1.17.1.dist-info/RECORD,,
545
+ hatchet_sdk-1.17.2.dist-info/METADATA,sha256=VjUqhyfWf1zjwywsLeGVT41CQJcda7YyTSMu1jA-NLM,3575
546
+ hatchet_sdk-1.17.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
547
+ hatchet_sdk-1.17.2.dist-info/entry_points.txt,sha256=Un_76pcLse-ZGBlwebhQpnTPyQrripeHW8J7qmEpGOk,1400
548
+ hatchet_sdk-1.17.2.dist-info/RECORD,,