prefect-client 3.1.11__tar.gz → 3.1.13__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 (290) hide show
  1. {prefect-client-3.1.11/src/prefect_client.egg-info → prefect-client-3.1.13}/PKG-INFO +1 -1
  2. {prefect-client-3.1.11 → prefect-client-3.1.13}/requirements-client.txt +2 -2
  3. prefect-client-3.1.13/src/prefect/_experimental/sla/client.py +92 -0
  4. prefect-client-3.1.13/src/prefect/_experimental/sla/objects.py +61 -0
  5. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/concurrency/services.py +2 -2
  6. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/concurrency/threads.py +6 -0
  7. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/retries.py +6 -3
  8. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/schemas/validators.py +6 -4
  9. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_version.py +3 -3
  10. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/artifacts.py +4 -1
  11. prefect-client-3.1.13/src/prefect/automations.py +429 -0
  12. prefect-client-3.1.13/src/prefect/blocks/__init__.py +7 -0
  13. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/blocks/abstract.py +57 -31
  14. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/blocks/core.py +181 -82
  15. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/blocks/notifications.py +134 -73
  16. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/blocks/redis.py +13 -9
  17. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/blocks/system.py +24 -11
  18. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/blocks/webhook.py +7 -5
  19. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/cache_policies.py +23 -22
  20. prefect-client-3.1.13/src/prefect/client/orchestration/__init__.py +1957 -0
  21. prefect-client-3.1.13/src/prefect/client/orchestration/_automations/client.py +329 -0
  22. prefect-client-3.1.13/src/prefect/client/orchestration/_blocks_documents/client.py +334 -0
  23. prefect-client-3.1.13/src/prefect/client/orchestration/_blocks_schemas/client.py +200 -0
  24. prefect-client-3.1.13/src/prefect/client/orchestration/_blocks_types/client.py +380 -0
  25. prefect-client-3.1.13/src/prefect/client/orchestration/_deployments/client.py +1128 -0
  26. prefect-client-3.1.13/src/prefect/client/orchestration/_flow_runs/client.py +903 -0
  27. prefect-client-3.1.13/src/prefect/client/orchestration/_flows/client.py +343 -0
  28. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/orchestration/_logs/client.py +16 -14
  29. prefect-client-3.1.13/src/prefect/client/schemas/__init__.py +91 -0
  30. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/schemas/objects.py +5 -5
  31. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/utilities.py +3 -3
  32. prefect-client-3.1.13/src/prefect/concurrency/__init__.py +0 -0
  33. prefect-client-3.1.13/src/prefect/concurrency/v1/__init__.py +0 -0
  34. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/context.py +15 -1
  35. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/deployments/base.py +13 -4
  36. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/deployments/flow_runs.py +5 -1
  37. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/deployments/runner.py +37 -1
  38. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/deployments/steps/core.py +1 -1
  39. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/deployments/steps/pull.py +8 -3
  40. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/deployments/steps/utility.py +2 -2
  41. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/docker/docker_image.py +13 -9
  42. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/engine.py +33 -11
  43. prefect-client-3.1.13/src/prefect/events/cli/__init__.py +0 -0
  44. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/events/cli/automations.py +4 -4
  45. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/events/clients.py +17 -14
  46. prefect-client-3.1.13/src/prefect/events/schemas/__init__.py +0 -0
  47. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/events/schemas/automations.py +12 -8
  48. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/events/schemas/events.py +5 -1
  49. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/events/worker.py +1 -1
  50. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/filesystems.py +7 -3
  51. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/flow_engine.py +64 -47
  52. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/flows.py +128 -74
  53. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/futures.py +14 -7
  54. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/infrastructure/provisioners/__init__.py +2 -0
  55. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/infrastructure/provisioners/cloud_run.py +4 -4
  56. prefect-client-3.1.13/src/prefect/infrastructure/provisioners/coiled.py +249 -0
  57. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/infrastructure/provisioners/container_instance.py +4 -3
  58. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/infrastructure/provisioners/ecs.py +55 -43
  59. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/infrastructure/provisioners/modal.py +5 -4
  60. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/input/actions.py +5 -1
  61. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/input/run_input.py +157 -43
  62. prefect-client-3.1.13/src/prefect/locking/__init__.py +0 -0
  63. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/logging/configuration.py +3 -3
  64. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/logging/filters.py +2 -2
  65. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/logging/formatters.py +15 -11
  66. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/logging/handlers.py +24 -14
  67. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/logging/highlighters.py +5 -5
  68. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/logging/loggers.py +28 -18
  69. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/logging/logging.yml +1 -1
  70. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/main.py +3 -1
  71. prefect-client-3.1.13/src/prefect/py.typed +0 -0
  72. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/results.py +166 -86
  73. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/runner/runner.py +38 -29
  74. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/runner/server.py +3 -1
  75. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/runner/storage.py +18 -18
  76. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/runner/submit.py +19 -12
  77. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/runtime/deployment.py +15 -8
  78. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/runtime/flow_run.py +19 -6
  79. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/runtime/task_run.py +7 -3
  80. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/base.py +17 -7
  81. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/legacy.py +4 -4
  82. prefect-client-3.1.13/src/prefect/settings/models/__init__.py +0 -0
  83. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/api.py +4 -3
  84. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/cli.py +4 -3
  85. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/client.py +7 -4
  86. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/cloud.py +9 -3
  87. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/deployments.py +4 -3
  88. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/experiments.py +4 -8
  89. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/flows.py +4 -3
  90. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/internal.py +4 -3
  91. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/logging.py +8 -6
  92. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/results.py +4 -3
  93. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/root.py +11 -16
  94. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/runner.py +8 -5
  95. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/server/api.py +6 -3
  96. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/server/database.py +120 -25
  97. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/server/deployments.py +4 -3
  98. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/server/ephemeral.py +7 -4
  99. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/server/events.py +6 -3
  100. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/server/flow_run_graph.py +4 -3
  101. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/server/root.py +4 -3
  102. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/server/services.py +15 -12
  103. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/server/tasks.py +7 -4
  104. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/server/ui.py +4 -3
  105. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/tasks.py +10 -5
  106. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/testing.py +4 -3
  107. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/worker.py +7 -4
  108. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/profiles.py +13 -12
  109. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/sources.py +20 -19
  110. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/states.py +74 -51
  111. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/task_engine.py +43 -33
  112. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/task_runners.py +85 -72
  113. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/task_runs.py +20 -11
  114. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/task_worker.py +14 -9
  115. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/tasks.py +36 -28
  116. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/telemetry/bootstrap.py +13 -9
  117. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/telemetry/run_telemetry.py +15 -13
  118. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/telemetry/services.py +4 -0
  119. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/transactions.py +3 -3
  120. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/types/__init__.py +3 -1
  121. prefect-client-3.1.13/src/prefect/utilities/__init__.py +0 -0
  122. prefect-client-3.1.13/src/prefect/utilities/_deprecated.py +38 -0
  123. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/engine.py +11 -4
  124. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/filesystem.py +2 -2
  125. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/generics.py +1 -1
  126. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/pydantic.py +21 -36
  127. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/templating.py +25 -1
  128. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/workers/base.py +58 -33
  129. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/workers/process.py +20 -15
  130. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/workers/server.py +4 -5
  131. {prefect-client-3.1.11 → prefect-client-3.1.13/src/prefect_client.egg-info}/PKG-INFO +1 -1
  132. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect_client.egg-info/SOURCES.txt +19 -0
  133. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect_client.egg-info/requires.txt +2 -2
  134. prefect-client-3.1.11/src/prefect/automations.py +0 -223
  135. prefect-client-3.1.11/src/prefect/blocks/__init__.py +0 -7
  136. prefect-client-3.1.11/src/prefect/client/orchestration/__init__.py +0 -3860
  137. prefect-client-3.1.11/src/prefect/client/schemas/__init__.py +0 -51
  138. {prefect-client-3.1.11 → prefect-client-3.1.13}/LICENSE +0 -0
  139. {prefect-client-3.1.11 → prefect-client-3.1.13}/MANIFEST.in +0 -0
  140. {prefect-client-3.1.11 → prefect-client-3.1.13}/README.md +0 -0
  141. {prefect-client-3.1.11 → prefect-client-3.1.13}/requirements-dev.txt +0 -0
  142. {prefect-client-3.1.11 → prefect-client-3.1.13}/requirements.txt +0 -0
  143. {prefect-client-3.1.11 → prefect-client-3.1.13}/setup.cfg +0 -0
  144. {prefect-client-3.1.11 → prefect-client-3.1.13}/setup.py +0 -0
  145. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/.prefectignore +0 -0
  146. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/__init__.py +0 -0
  147. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_experimental/__init__.py +0 -0
  148. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_experimental/lineage.py +0 -0
  149. {prefect-client-3.1.11/src/prefect/_internal → prefect-client-3.1.13/src/prefect/_experimental/sla}/__init__.py +0 -0
  150. {prefect-client-3.1.11/src/prefect/_internal/compatibility → prefect-client-3.1.13/src/prefect/_internal}/__init__.py +0 -0
  151. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/_logging.py +0 -0
  152. {prefect-client-3.1.11/src/prefect/_internal/pydantic/annotations → prefect-client-3.1.13/src/prefect/_internal/compatibility}/__init__.py +0 -0
  153. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/compatibility/async_dispatch.py +0 -0
  154. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/compatibility/deprecated.py +0 -0
  155. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/compatibility/migration.py +0 -0
  156. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/concurrency/__init__.py +0 -0
  157. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/concurrency/api.py +0 -0
  158. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/concurrency/calls.py +0 -0
  159. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/concurrency/cancellation.py +0 -0
  160. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/concurrency/event_loop.py +0 -0
  161. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/concurrency/inspection.py +0 -0
  162. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/concurrency/primitives.py +0 -0
  163. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/concurrency/waiters.py +0 -0
  164. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/integrations.py +0 -0
  165. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/pydantic/__init__.py +0 -0
  166. {prefect-client-3.1.11/src/prefect/_internal/schemas → prefect-client-3.1.13/src/prefect/_internal/pydantic/annotations}/__init__.py +0 -0
  167. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/pydantic/annotations/pendulum.py +0 -0
  168. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/pydantic/schemas.py +0 -0
  169. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/pydantic/v1_schema.py +0 -0
  170. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/pydantic/v2_schema.py +0 -0
  171. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/pydantic/v2_validated_func.py +0 -0
  172. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/pytz.py +0 -0
  173. {prefect-client-3.1.11/src/prefect/client/orchestration/_artifacts → prefect-client-3.1.13/src/prefect/_internal/schemas}/__init__.py +0 -0
  174. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/schemas/bases.py +0 -0
  175. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/schemas/fields.py +0 -0
  176. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/_internal/schemas/serializers.py +0 -0
  177. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/agent.py +0 -0
  178. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/blocks/fields.py +0 -0
  179. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/__init__.py +0 -0
  180. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/base.py +0 -0
  181. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/cloud.py +0 -0
  182. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/collections.py +0 -0
  183. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/constants.py +0 -0
  184. {prefect-client-3.1.11/src/prefect/client/orchestration/_concurrency_limits → prefect-client-3.1.13/src/prefect/client/orchestration/_artifacts}/__init__.py +0 -0
  185. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/orchestration/_artifacts/client.py +0 -0
  186. {prefect-client-3.1.11/src/prefect/client/orchestration/_logs → prefect-client-3.1.13/src/prefect/client/orchestration/_automations}/__init__.py +0 -0
  187. {prefect-client-3.1.11/src/prefect/client/orchestration/_variables → prefect-client-3.1.13/src/prefect/client/orchestration/_blocks_documents}/__init__.py +0 -0
  188. {prefect-client-3.1.11/src/prefect/client/types → prefect-client-3.1.13/src/prefect/client/orchestration/_blocks_schemas}/__init__.py +0 -0
  189. {prefect-client-3.1.11/src/prefect/concurrency → prefect-client-3.1.13/src/prefect/client/orchestration/_blocks_types}/__init__.py +0 -0
  190. {prefect-client-3.1.11/src/prefect/concurrency/v1 → prefect-client-3.1.13/src/prefect/client/orchestration/_concurrency_limits}/__init__.py +0 -0
  191. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/orchestration/_concurrency_limits/client.py +0 -0
  192. {prefect-client-3.1.11/src/prefect/events/cli → prefect-client-3.1.13/src/prefect/client/orchestration/_deployments}/__init__.py +0 -0
  193. {prefect-client-3.1.11/src/prefect/events/schemas → prefect-client-3.1.13/src/prefect/client/orchestration/_flow_runs}/__init__.py +0 -0
  194. {prefect-client-3.1.11/src/prefect/locking → prefect-client-3.1.13/src/prefect/client/orchestration/_flows}/__init__.py +0 -0
  195. {prefect-client-3.1.11/src/prefect/settings/models → prefect-client-3.1.13/src/prefect/client/orchestration/_logs}/__init__.py +0 -0
  196. {prefect-client-3.1.11/src/prefect/utilities → prefect-client-3.1.13/src/prefect/client/orchestration/_variables}/__init__.py +0 -0
  197. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/orchestration/_variables/client.py +0 -0
  198. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/orchestration/base.py +0 -0
  199. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/orchestration/routes.py +0 -0
  200. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/schemas/actions.py +0 -0
  201. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/schemas/filters.py +0 -0
  202. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/schemas/responses.py +0 -0
  203. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/schemas/schedules.py +0 -0
  204. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/schemas/sorting.py +0 -0
  205. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/subscriptions.py +0 -0
  206. /prefect-client-3.1.11/src/prefect/py.typed → /prefect-client-3.1.13/src/prefect/client/types/__init__.py +0 -0
  207. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/client/types/flexible_schedule_list.py +0 -0
  208. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/concurrency/_asyncio.py +0 -0
  209. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/concurrency/_events.py +0 -0
  210. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/concurrency/asyncio.py +0 -0
  211. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/concurrency/context.py +0 -0
  212. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/concurrency/services.py +0 -0
  213. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/concurrency/sync.py +0 -0
  214. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/concurrency/v1/_asyncio.py +0 -0
  215. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/concurrency/v1/_events.py +0 -0
  216. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/concurrency/v1/asyncio.py +0 -0
  217. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/concurrency/v1/context.py +0 -0
  218. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/concurrency/v1/services.py +0 -0
  219. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/concurrency/v1/sync.py +0 -0
  220. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/deployments/__init__.py +0 -0
  221. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/deployments/deployments.py +0 -0
  222. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/deployments/schedules.py +0 -0
  223. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/deployments/steps/__init__.py +0 -0
  224. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/docker/__init__.py +0 -0
  225. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/events/__init__.py +0 -0
  226. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/events/actions.py +0 -0
  227. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/events/filters.py +0 -0
  228. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/events/related.py +0 -0
  229. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/events/schemas/deployment_triggers.py +0 -0
  230. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/events/schemas/labelling.py +0 -0
  231. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/events/utilities.py +0 -0
  232. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/exceptions.py +0 -0
  233. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/flow_runs.py +0 -0
  234. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/infrastructure/__init__.py +0 -0
  235. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/infrastructure/base.py +0 -0
  236. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/input/__init__.py +0 -0
  237. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/locking/filesystem.py +0 -0
  238. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/locking/memory.py +0 -0
  239. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/locking/protocol.py +0 -0
  240. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/logging/__init__.py +0 -0
  241. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/plugins.py +0 -0
  242. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/runner/__init__.py +0 -0
  243. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/runner/utils.py +0 -0
  244. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/runtime/__init__.py +0 -0
  245. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/serializers.py +0 -0
  246. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json +0 -0
  247. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/server/api/static/prefect-logo-mark-gradient.png +0 -0
  248. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/__init__.py +0 -0
  249. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/constants.py +0 -0
  250. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/context.py +0 -0
  251. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/models/server/__init__.py +0 -0
  252. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/settings/profiles.toml +0 -0
  253. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/telemetry/__init__.py +0 -0
  254. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/telemetry/instrumentation.py +0 -0
  255. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/telemetry/logging.py +0 -0
  256. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/telemetry/processors.py +0 -0
  257. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/types/entrypoint.py +0 -0
  258. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/_engine.py +0 -0
  259. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/_git.py +0 -0
  260. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/annotations.py +0 -0
  261. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/asyncutils.py +0 -0
  262. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/callables.py +0 -0
  263. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/collections.py +0 -0
  264. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/compat.py +0 -0
  265. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/context.py +0 -0
  266. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/dispatch.py +0 -0
  267. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/dockerutils.py +0 -0
  268. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/hashing.py +0 -0
  269. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/importtools.py +0 -0
  270. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/math.py +0 -0
  271. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/names.py +0 -0
  272. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/processutils.py +0 -0
  273. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/render_swagger.py +0 -0
  274. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/schema_tools/__init__.py +0 -0
  275. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/schema_tools/hydration.py +0 -0
  276. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/schema_tools/validation.py +0 -0
  277. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/services.py +0 -0
  278. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/slugify.py +0 -0
  279. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/text.py +0 -0
  280. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/timeout.py +0 -0
  281. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/urls.py +0 -0
  282. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/utilities/visualization.py +0 -0
  283. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/variables.py +0 -0
  284. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/workers/__init__.py +0 -0
  285. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/workers/block.py +0 -0
  286. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/workers/cloud.py +0 -0
  287. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect/workers/utilities.py +0 -0
  288. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect_client.egg-info/dependency_links.txt +0 -0
  289. {prefect-client-3.1.11 → prefect-client-3.1.13}/src/prefect_client.egg-info/top_level.txt +0 -0
  290. {prefect-client-3.1.11 → prefect-client-3.1.13}/versioneer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: prefect-client
3
- Version: 3.1.11
3
+ Version: 3.1.13
4
4
  Summary: Workflow orchestration and management.
5
5
  Home-page: https://www.prefect.io
6
6
  Author: Prefect Technologies, Inc.
@@ -3,7 +3,7 @@ asgi-lifespan >= 1.0, < 3.0
3
3
  cachetools >= 5.3, < 6.0
4
4
  cloudpickle >= 2.0, < 4.0
5
5
  coolname >= 1.0.4, < 3.0.0
6
- croniter >= 1.0.12, < 6.0.0
6
+ croniter >= 1.0.12, < 7.0.0
7
7
  exceptiongroup >= 1.0.0
8
8
  fastapi >= 0.111.0, < 1.0.0
9
9
  fsspec >= 2022.5.0
@@ -20,7 +20,7 @@ packaging >= 21.3, < 24.3
20
20
  pathspec >= 0.8.0
21
21
  pendulum >= 3.0.0, <4
22
22
  prometheus-client >= 0.20.0
23
- pydantic >= 2.7, < 3.0.0, != 2.10.0
23
+ pydantic >= 2.9, < 3.0.0, != 2.10.0
24
24
  pydantic_core >= 2.12.0, < 3.0.0
25
25
  pydantic_extra_types >= 2.8.2, < 3.0.0
26
26
  pydantic_settings > 2.2.1
@@ -0,0 +1,92 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from prefect.client.orchestration.base import BaseAsyncClient, BaseClient
6
+
7
+ if TYPE_CHECKING:
8
+ from uuid import UUID
9
+
10
+ from prefect._experimental.sla.objects import SlaMergeResponse, SlaTypes
11
+
12
+
13
+ class SlaClient(BaseClient):
14
+ def apply_slas_for_deployment(
15
+ self, deployment_id: "UUID", slas: "list[SlaTypes]"
16
+ ) -> "SlaMergeResponse":
17
+ """
18
+ Applies service level agreements for a deployment. Performs matching by SLA name. If a SLA with the same name already exists, it will be updated. If a SLA with the same name does not exist, it will be created. Existing SLAs that are not in the list will be deleted.
19
+ Args:
20
+ deployment_id: The ID of the deployment to update SLAs for
21
+ slas: List of SLAs to associate with the deployment
22
+ Raises:
23
+ httpx.RequestError: if the SLAs were not updated for any reason
24
+ Returns:
25
+ SlaMergeResponse: The response from the backend, containing the names of the created, updated, and deleted SLAs
26
+ """
27
+ resource_id = f"prefect.deployment.{deployment_id}"
28
+
29
+ for sla in slas:
30
+ sla.set_deployment_id(deployment_id)
31
+
32
+ slas_spec_list = [
33
+ sla.model_dump(mode="json", exclude_unset=True) for sla in slas
34
+ ]
35
+
36
+ response = self.request(
37
+ "POST",
38
+ f"/slas/apply-resource-slas/{resource_id}",
39
+ json=slas_spec_list,
40
+ )
41
+ response.raise_for_status()
42
+
43
+ response_json = response.json()
44
+
45
+ from prefect._experimental.sla.objects import SlaMergeResponse
46
+
47
+ return SlaMergeResponse(
48
+ created=[sla.get("name") for sla in response_json.get("created")],
49
+ updated=[sla.get("name") for sla in response_json.get("updated")],
50
+ deleted=[sla.get("name") for sla in response_json.get("deleted")],
51
+ )
52
+
53
+
54
+ class SlaAsyncClient(BaseAsyncClient):
55
+ async def apply_slas_for_deployment(
56
+ self, deployment_id: "UUID", slas: "list[SlaTypes]"
57
+ ) -> "UUID":
58
+ """
59
+ Applies service level agreements for a deployment. Performs matching by SLA name. If a SLA with the same name already exists, it will be updated. If a SLA with the same name does not exist, it will be created. Existing SLAs that are not in the list will be deleted.
60
+ Args:
61
+ deployment_id: The ID of the deployment to update SLAs for
62
+ slas: List of SLAs to associate with the deployment
63
+ Raises:
64
+ httpx.RequestError: if the SLAs were not updated for any reason
65
+ Returns:
66
+ SlaMergeResponse: The response from the backend, containing the names of the created, updated, and deleted SLAs
67
+ """
68
+ resource_id = f"prefect.deployment.{deployment_id}"
69
+
70
+ for sla in slas:
71
+ sla.set_deployment_id(deployment_id)
72
+
73
+ slas_spec_list = [
74
+ sla.model_dump(mode="json", exclude_unset=True) for sla in slas
75
+ ]
76
+
77
+ response = await self.request(
78
+ "POST",
79
+ f"/slas/apply-resource-slas/{resource_id}",
80
+ json=slas_spec_list,
81
+ )
82
+ response.raise_for_status()
83
+
84
+ response_json = response.json()
85
+
86
+ from prefect._experimental.sla.objects import SlaMergeResponse
87
+
88
+ return SlaMergeResponse(
89
+ created=[sla.get("name") for sla in response_json.get("created")],
90
+ updated=[sla.get("name") for sla in response_json.get("updated")],
91
+ deleted=[sla.get("name") for sla in response_json.get("deleted")],
92
+ )
@@ -0,0 +1,61 @@
1
+ from __future__ import annotations
2
+
3
+ import abc
4
+ from typing import Literal, Optional, Union
5
+ from uuid import UUID
6
+
7
+ from pydantic import Field, PrivateAttr, computed_field
8
+ from typing_extensions import Self, TypeAlias
9
+
10
+ from prefect._internal.schemas.bases import PrefectBaseModel
11
+
12
+
13
+ class ServiceLevelAgreement(PrefectBaseModel, abc.ABC):
14
+ """An ORM representation of a Service Level Agreement."""
15
+
16
+ _deployment_id: Optional[UUID] = PrivateAttr(default=None)
17
+
18
+ name: str = Field(
19
+ default=...,
20
+ description="The name of the SLA. Names must be unique on a per-deployment basis.",
21
+ )
22
+ severity: Literal["minor", "low", "moderate", "high", "critical"] = Field(
23
+ default="moderate",
24
+ description="The severity of the SLA.",
25
+ )
26
+ enabled: Optional[bool] = Field(
27
+ default=True,
28
+ description="Whether the SLA is enabled.",
29
+ )
30
+
31
+ def set_deployment_id(self, deployment_id: UUID) -> Self:
32
+ self._deployment_id = deployment_id
33
+ return self
34
+
35
+ @computed_field
36
+ @property
37
+ def owner_resource(self) -> Union[str, None]:
38
+ if self._deployment_id:
39
+ return f"prefect.deployment.{self._deployment_id}"
40
+ return None
41
+
42
+
43
+ class TimeToCompletionSla(ServiceLevelAgreement):
44
+ """An SLA that triggers when a flow run takes longer than the specified duration."""
45
+
46
+ duration: int = Field(
47
+ default=...,
48
+ description="The maximum flow run duration allowed before the SLA is violated, expressed in seconds.",
49
+ )
50
+
51
+
52
+ class SlaMergeResponse(PrefectBaseModel):
53
+ """A response object for the apply_slas_for_deployment method. Contains the names of the created, updated, and deleted SLAs."""
54
+
55
+ created: list[str]
56
+ updated: list[str]
57
+ deleted: list[str]
58
+
59
+
60
+ # Concrete SLA types
61
+ SlaTypes: TypeAlias = Union[TimeToCompletionSla]
@@ -32,7 +32,7 @@ class _QueueServiceBase(abc.ABC, Generic[T]):
32
32
  self._task: Optional[asyncio.Task[None]] = None
33
33
  self._stopped: bool = False
34
34
  self._started: bool = False
35
- self._key = hash(args)
35
+ self._key = hash((self.__class__, *args))
36
36
  self._lock = threading.Lock()
37
37
  self._queue_get_thread = WorkerThread(
38
38
  # TODO: This thread should not need to be a daemon but when it is not, it
@@ -256,7 +256,7 @@ class _QueueServiceBase(abc.ABC, Generic[T]):
256
256
  If an instance already exists with the given arguments, it will be returned.
257
257
  """
258
258
  with cls._instance_lock:
259
- key = hash(args)
259
+ key = hash((cls, *args))
260
260
  if key not in cls._instances:
261
261
  cls._instances[key] = cls._new_instance(*args)
262
262
 
@@ -2,6 +2,8 @@
2
2
  Utilities for managing worker threads.
3
3
  """
4
4
 
5
+ from __future__ import annotations
6
+
5
7
  import asyncio
6
8
  import atexit
7
9
  import concurrent.futures
@@ -197,6 +199,10 @@ class EventLoopThread(Portal):
197
199
  def running(self) -> bool:
198
200
  return not self._shutdown_event.is_set()
199
201
 
202
+ @property
203
+ def loop(self) -> asyncio.AbstractEventLoop | None:
204
+ return self._loop
205
+
200
206
  def _entrypoint(self):
201
207
  """
202
208
  Entrypoint for the thread.
@@ -29,7 +29,7 @@ def retry_async_fn(
29
29
  retry_on_exceptions: tuple[type[Exception], ...] = (Exception,),
30
30
  operation_name: Optional[str] = None,
31
31
  ) -> Callable[
32
- [Callable[P, Coroutine[Any, Any, R]]], Callable[P, Coroutine[Any, Any, Optional[R]]]
32
+ [Callable[P, Coroutine[Any, Any, R]]], Callable[P, Coroutine[Any, Any, R]]
33
33
  ]:
34
34
  """A decorator for retrying an async function.
35
35
 
@@ -48,9 +48,9 @@ def retry_async_fn(
48
48
 
49
49
  def decorator(
50
50
  func: Callable[P, Coroutine[Any, Any, R]],
51
- ) -> Callable[P, Coroutine[Any, Any, Optional[R]]]:
51
+ ) -> Callable[P, Coroutine[Any, Any, R]]:
52
52
  @wraps(func)
53
- async def wrapper(*args: P.args, **kwargs: P.kwargs) -> Optional[R]:
53
+ async def wrapper(*args: P.args, **kwargs: P.kwargs) -> R:
54
54
  name = operation_name or func.__name__
55
55
  for attempt in range(max_attempts):
56
56
  try:
@@ -67,6 +67,9 @@ def retry_async_fn(
67
67
  f"Retrying in {delay:.2f} seconds..."
68
68
  )
69
69
  await asyncio.sleep(delay)
70
+ # Technically unreachable, but this raise helps pyright know that this function
71
+ # won't return None.
72
+ raise Exception(f"Function {name!r} failed after {max_attempts} attempts")
70
73
 
71
74
  return wrapper
72
75
 
@@ -6,6 +6,8 @@ format.
6
6
  This will be subject to consolidation and refactoring over the next few months.
7
7
  """
8
8
 
9
+ from __future__ import annotations
10
+
9
11
  import os
10
12
  import re
11
13
  import urllib.parse
@@ -627,18 +629,18 @@ def validate_name_present_on_nonanonymous_blocks(values: M) -> M:
627
629
 
628
630
 
629
631
  @overload
630
- def validate_command(v: str) -> Path:
632
+ def validate_working_dir(v: str) -> Path:
631
633
  ...
632
634
 
633
635
 
634
636
  @overload
635
- def validate_command(v: None) -> None:
637
+ def validate_working_dir(v: None) -> None:
636
638
  ...
637
639
 
638
640
 
639
- def validate_command(v: Optional[str]) -> Optional[Path]:
641
+ def validate_working_dir(v: Optional[Path | str]) -> Optional[Path]:
640
642
  """Make sure that the working directory is formatted for the current platform."""
641
- if v is not None:
643
+ if isinstance(v, str):
642
644
  return relative_path_to_current_platform(v)
643
645
  return v
644
646
 
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2025-01-02T13:11:17-0600",
11
+ "date": "2025-01-17T08:46:53-0800",
12
12
  "dirty": true,
13
13
  "error": null,
14
- "full-revisionid": "e448bd3462d7c2580427624f426d81cf6e9a7ff1",
15
- "version": "3.1.11"
14
+ "full-revisionid": "16e85ce3c281778f5ab6487a73377eed63bcac8b",
15
+ "version": "3.1.13"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -20,7 +20,10 @@ from prefect.logging.loggers import get_logger
20
20
  from prefect.utilities.asyncutils import sync_compatible
21
21
  from prefect.utilities.context import get_task_and_flow_run_ids
22
22
 
23
- logger = get_logger("artifacts")
23
+ if TYPE_CHECKING:
24
+ import logging
25
+
26
+ logger: "logging.Logger" = get_logger("artifacts")
24
27
 
25
28
  if TYPE_CHECKING:
26
29
  from prefect.client.orchestration import PrefectClient