prefect 3.9.2.dev2__py3-none-any.whl → 3.9.2.dev4__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.
Files changed (54) hide show
  1. prefect/_build_info.py +3 -3
  2. prefect/cli/AGENTS.md +1 -1
  3. prefect/cli/_utilities.py +11 -0
  4. prefect/cli/artifact.py +3 -2
  5. prefect/cli/automation.py +3 -2
  6. prefect/cli/block.py +5 -4
  7. prefect/cli/cloud/__init__.py +2 -1
  8. prefect/cli/cloud/asset.py +2 -1
  9. prefect/cli/cloud/webhook.py +3 -2
  10. prefect/cli/concurrency_limit.py +3 -2
  11. prefect/cli/config.py +2 -2
  12. prefect/cli/deployment.py +4 -3
  13. prefect/cli/flow.py +2 -1
  14. prefect/cli/flow_run.py +4 -3
  15. prefect/cli/global_concurrency_limit.py +3 -2
  16. prefect/cli/profile.py +3 -2
  17. prefect/cli/result_storage.py +5 -6
  18. prefect/cli/server.py +5 -7
  19. prefect/cli/task_run.py +4 -3
  20. prefect/cli/variable.py +4 -8
  21. prefect/cli/work_pool.py +6 -5
  22. prefect/cli/work_queue.py +6 -5
  23. prefect/server/ui/assets/AppRouterView-BRZ-h3PX.js +1 -0
  24. prefect/server/ui/assets/{Automation-tIaRjyEQ.js → Automation-q5kOvQxn.js} +1 -1
  25. prefect/server/ui/assets/{AutomationCreate-BVQvWZWC.js → AutomationCreate-CkbBTnXy.js} +1 -1
  26. prefect/server/ui/assets/{AutomationEdit-DaoP2KBR.js → AutomationEdit-obIZSkLQ.js} +1 -1
  27. prefect/server/ui/assets/{Automations-D5oyiEer.js → Automations-C9z20upn.js} +1 -1
  28. prefect/server/ui/assets/{BlockEdit-PMZC-PoP.js → BlockEdit-CfPdt-3J.js} +1 -1
  29. prefect/server/ui/assets/{BlockView-DIkl_ti_.js → BlockView-CjhQHUa6.js} +1 -1
  30. prefect/server/ui/assets/{BlocksCatalogCreate-B0J_uO1w.js → BlocksCatalogCreate-BRPTHx0W.js} +1 -1
  31. prefect/server/ui/assets/{ConcurrencyLimit-BNvcapTj.js → ConcurrencyLimit-BEPa96o_.js} +1 -1
  32. prefect/server/ui/assets/Dashboard-aUREkO0T.js +1 -0
  33. prefect/server/ui/assets/{Deployment-DQLHX32G.js → Deployment-BeNye0WL.js} +1 -1
  34. prefect/server/ui/assets/{DeploymentDuplicate-Di8WAOJC.js → DeploymentDuplicate-BAI3BiHX.js} +1 -1
  35. prefect/server/ui/assets/{DeploymentEdit-B5l9_1f9.js → DeploymentEdit-CEs5daEt.js} +1 -1
  36. prefect/server/ui/assets/{Flow-DqLVhb8w.js → Flow-B8_UGveV.js} +1 -1
  37. prefect/server/ui/assets/{FlowRun-D3q2diun.js → FlowRun-Ck0GmNmq.js} +1 -1
  38. prefect/server/ui/assets/{FlowRunCreate-CJ_0lpum.js → FlowRunCreate-CD0Ntq9p.js} +1 -1
  39. prefect/server/ui/assets/{Runs-Dtzds5Bs.js → Runs-DYoGxpr8.js} +1 -1
  40. prefect/server/ui/assets/{Settings-BM3cujVC.js → Settings-D7NRcHSf.js} +1 -1
  41. prefect/server/ui/assets/{TaskRun-DDRtWS6c.js → TaskRun-PrJYgTTc.js} +1 -1
  42. prefect/server/ui/assets/{Unauthenticated-BHJzgpf2.js → Unauthenticated-0le1fWs3.js} +1 -1
  43. prefect/server/ui/assets/{index-Bny_92F-.js → index-Dag4OkY5.js} +2 -2
  44. prefect/server/ui/assets/useApiConfig-Df1ZZAZJ.js +1 -0
  45. prefect/server/ui/assets/{usePrefectApi-8js-IVfa.js → usePrefectApi-iWUyYqEQ.js} +1 -1
  46. prefect/server/ui/index.html +1 -1
  47. {prefect-3.9.2.dev2.dist-info → prefect-3.9.2.dev4.dist-info}/METADATA +1 -1
  48. {prefect-3.9.2.dev2.dist-info → prefect-3.9.2.dev4.dist-info}/RECORD +51 -51
  49. prefect/server/ui/assets/AppRouterView-BB-Kuhg9.js +0 -1
  50. prefect/server/ui/assets/Dashboard-BQRCLlxK.js +0 -1
  51. prefect/server/ui/assets/useApiConfig-Cal9ujjw.js +0 -1
  52. {prefect-3.9.2.dev2.dist-info → prefect-3.9.2.dev4.dist-info}/WHEEL +0 -0
  53. {prefect-3.9.2.dev2.dist-info → prefect-3.9.2.dev4.dist-info}/entry_points.txt +0 -0
  54. {prefect-3.9.2.dev2.dist-info → prefect-3.9.2.dev4.dist-info}/licenses/LICENSE +0 -0
prefect/_build_info.py CHANGED
@@ -1,5 +1,5 @@
1
1
  # Generated by versioningit
2
- __version__ = "3.9.2.dev2"
3
- __build_date__ = "2026-11-02 08:16:54.718332+00:00"
4
- __git_commit__ = "da9d9dc15f647f10135a8ff79ce93c4bdb2dbf6a"
2
+ __version__ = "3.9.2.dev4"
3
+ __build_date__ = "2026-11-04 08:14:01.644568+00:00"
4
+ __git_commit__ = "60d9ea54535ee10be2e7481fd1d930815c87b649"
5
5
  __dirty__ = False
prefect/cli/AGENTS.md CHANGED
@@ -6,7 +6,7 @@ Prefect command-line interface, powered by **cyclopts**.
6
6
 
7
7
  - **Use `rich` for all output.** Console output via `rich.console`, tables via `rich.table`, progress bars via `rich.progress`. Always use `exit_with_error` for error exits.
8
8
  - **Support JSON output whenever possible.** Commands should have a `--json` flag or equivalent for machine-readable output. Any diagnostic or informational `print()` calls must be suppressed when JSON output is active — mixing human-readable text with the JSON payload breaks machine consumers.
9
- - **Print JSON and other verbatim user data with `markup=False, emoji=False`.** `console.print` otherwise parses `[...]` as Rich markup and `:name:` as emoji aliases, silently rewriting payloads (or raising `MarkupError` on stray closing tags). `print_json` and `Pretty` are not affected.
9
+ - **Print JSON, YAML, and other verbatim user data with `print_verbatim` from `_utilities.py`.** `console.print` otherwise parses `[...]` as Rich markup and `:name:` as emoji aliases, silently rewriting payloads (or raising `MarkupError` on stray closing tags). `print_verbatim` disables both and soft-wraps; `tests/cli/test_utilities.py` fails if serialized output goes through `console.print` directly. `print_json` and `Pretty` are not affected.
10
10
  - **Page through "all records" reads.** Client `read_*` list calls without `limit` return at most `PREFECT_SERVER_API_DEFAULT_LIMIT` (200) rows (server `LimitBody`) — or fewer when the client method has its own default `limit` (e.g. `read_global_concurrency_limits` defaults to 10) — so `--all`/bulk commands must loop on `offset`. When deleting while paging, re-read from offset 0 each pass — advancing `offset` skips rows that shifted into earlier pages.
11
11
  - **Excluded from `prefect-client`** — the entire `cli/` directory is stripped during the client package build.
12
12
 
prefect/cli/_utilities.py CHANGED
@@ -28,6 +28,17 @@ def exit_with_success(message: str, **kwargs: Any) -> NoReturn:
28
28
  raise SystemExit(0)
29
29
 
30
30
 
31
+ def print_verbatim(output: str) -> None:
32
+ """
33
+ Print machine-readable output (e.g. JSON or YAML) exactly as given.
34
+
35
+ Rich markup and emoji alias parsing are disabled so user data like
36
+ `[red]text[/red]` or `:smile:` is not rewritten, and soft wrapping keeps
37
+ long lines intact.
38
+ """
39
+ _cli.console.print(output, soft_wrap=True, markup=False, emoji=False)
40
+
41
+
31
42
  def with_cli_exception_handling(fn: Callable[..., Any]) -> Callable[..., Any]:
32
43
  if inspect.iscoroutinefunction(fn):
33
44
 
prefect/cli/artifact.py CHANGED
@@ -13,6 +13,7 @@ import prefect.cli._app as _cli
13
13
  from prefect.cli._utilities import (
14
14
  exit_with_error,
15
15
  exit_with_success,
16
+ print_verbatim,
16
17
  with_cli_exception_handling,
17
18
  )
18
19
 
@@ -77,7 +78,7 @@ async def list_artifacts(
77
78
  if output and output.lower() == "json":
78
79
  artifacts_json = [artifact.model_dump(mode="json") for artifact in artifacts]
79
80
  json_output = orjson.dumps(artifacts_json, option=orjson.OPT_INDENT_2).decode()
80
- _cli.console.print(json_output, soft_wrap=True, markup=False, emoji=False)
81
+ print_verbatim(json_output)
81
82
  else:
82
83
  table = Table(
83
84
  title="Artifacts",
@@ -181,7 +182,7 @@ async def inspect(
181
182
  json_output = orjson.dumps(
182
183
  artifacts_json, option=orjson.OPT_INDENT_2
183
184
  ).decode()
184
- _cli.console.print(json_output, soft_wrap=True, markup=False, emoji=False)
185
+ print_verbatim(json_output)
185
186
  else:
186
187
  _cli.console.print(Pretty(artifacts_json))
187
188
 
prefect/cli/automation.py CHANGED
@@ -15,6 +15,7 @@ import prefect.cli._app as _cli
15
15
  from prefect.cli._utilities import (
16
16
  exit_with_error,
17
17
  exit_with_success,
18
+ print_verbatim,
18
19
  with_cli_exception_handling,
19
20
  )
20
21
 
@@ -171,9 +172,9 @@ async def inspect(
171
172
  automation = no_really_json(automation)
172
173
 
173
174
  if yaml or (output and output.lower() == "yaml"):
174
- _cli.console.print(pyyaml.dump(automation, sort_keys=False))
175
+ print_verbatim(pyyaml.dump(automation, sort_keys=False))
175
176
  elif json or (output and output.lower() == "json"):
176
- _cli.console.print(
177
+ print_verbatim(
177
178
  orjson.dumps(automation, option=orjson.OPT_INDENT_2).decode()
178
179
  )
179
180
  else:
prefect/cli/block.py CHANGED
@@ -22,6 +22,7 @@ import prefect.cli._app as _cli
22
22
  from prefect.cli._utilities import (
23
23
  exit_with_error,
24
24
  exit_with_success,
25
+ print_verbatim,
25
26
  with_cli_exception_handling,
26
27
  )
27
28
 
@@ -287,7 +288,7 @@ async def block_ls(
287
288
  if output and output.lower() == "json":
288
289
  blocks_json = [block.model_dump(mode="json") for block in blocks]
289
290
  json_output = orjson.dumps(blocks_json, option=orjson.OPT_INDENT_2).decode()
290
- _cli.console.print(json_output, soft_wrap=True)
291
+ print_verbatim(json_output)
291
292
  else:
292
293
  table = Table(
293
294
  title="Blocks", caption="List Block Types using `prefect block type ls`"
@@ -464,7 +465,7 @@ async def block_inspect(
464
465
  if output and output.lower() == "json":
465
466
  block_json = block_document.model_dump(mode="json")
466
467
  json_output = orjson.dumps(block_json, option=orjson.OPT_INDENT_2).decode()
467
- _cli.console.print(json_output, soft_wrap=True)
468
+ print_verbatim(json_output)
468
469
  else:
469
470
  _cli.console.print(_display_block(block_document))
470
471
 
@@ -501,7 +502,7 @@ async def list_types(
501
502
  json_output = orjson.dumps(
502
503
  block_types_json, option=orjson.OPT_INDENT_2
503
504
  ).decode()
504
- _cli.console.print(json_output, soft_wrap=True)
505
+ print_verbatim(json_output)
505
506
  else:
506
507
  table = Table(
507
508
  title="Block Types",
@@ -572,7 +573,7 @@ async def blocktype_inspect(
572
573
  {"block_type": block_type_json, "schema": schema_json},
573
574
  option=orjson.OPT_INDENT_2,
574
575
  ).decode()
575
- _cli.console.print(json_output, soft_wrap=True)
576
+ print_verbatim(json_output)
576
577
  return
577
578
 
578
579
  _cli.console.print(_display_block_type(block_type))
@@ -20,6 +20,7 @@ from prefect.cli._cloud_utils import (
20
20
  prompt_select_from_list,
21
21
  )
22
22
  from prefect.cli._utilities import (
23
+ print_verbatim,
23
24
  exit_with_error,
24
25
  exit_with_success,
25
26
  with_cli_exception_handling,
@@ -350,7 +351,7 @@ async def workspace_ls(
350
351
  workspace.model_dump(mode="json") for workspace in sorted_workspaces
351
352
  ]
352
353
  json_output = orjson.dumps(workspaces_json, option=orjson.OPT_INDENT_2).decode()
353
- _cli.console.print(json_output, soft_wrap=True)
354
+ print_verbatim(json_output)
354
355
  return
355
356
 
356
357
  current_workspace = get_current_workspace(workspaces)
@@ -12,6 +12,7 @@ from prefect.cli._cloud_utils import confirm_logged_in
12
12
  from prefect.cli._utilities import (
13
13
  exit_with_error,
14
14
  exit_with_success,
15
+ print_verbatim,
15
16
  with_cli_exception_handling,
16
17
  )
17
18
 
@@ -85,7 +86,7 @@ async def asset_ls(
85
86
 
86
87
  if output and output.lower() == "json":
87
88
  json_output = orjson.dumps(assets, option=orjson.OPT_INDENT_2).decode()
88
- _cli.console.print(json_output, soft_wrap=True)
89
+ print_verbatim(json_output)
89
90
  else:
90
91
  if not assets:
91
92
  _cli.console.print("No assets found in this workspace.")
@@ -15,6 +15,7 @@ from prefect.cli._cloud_utils import (
15
15
  )
16
16
  from prefect.cli._utilities import (
17
17
  exit_with_error,
18
+ print_verbatim,
18
19
  with_cli_exception_handling,
19
20
  )
20
21
 
@@ -55,7 +56,7 @@ async def webhook_ls(
55
56
  json_output = orjson.dumps(
56
57
  retrieved_webhooks, option=orjson.OPT_INDENT_2
57
58
  ).decode()
58
- _cli.console.print(json_output, soft_wrap=True)
59
+ print_verbatim(json_output)
59
60
  return
60
61
  display_table = render_webhooks_into_table(retrieved_webhooks)
61
62
  _cli.console.print(display_table)
@@ -88,7 +89,7 @@ async def webhook_get(
88
89
  webhook = await client.request("GET", f"/webhooks/{webhook_id}")
89
90
  if output and output.lower() == "json":
90
91
  json_output = orjson.dumps(webhook, option=orjson.OPT_INDENT_2).decode()
91
- _cli.console.print(json_output, soft_wrap=True)
92
+ print_verbatim(json_output)
92
93
  return
93
94
  display_table = render_webhooks_into_table([webhook])
94
95
  _cli.console.print(display_table)
@@ -17,6 +17,7 @@ import prefect.cli._app as _cli
17
17
  from prefect.cli._utilities import (
18
18
  exit_with_error,
19
19
  exit_with_success,
20
+ print_verbatim,
20
21
  with_cli_exception_handling,
21
22
  )
22
23
 
@@ -91,7 +92,7 @@ async def inspect(
91
92
  if output and output.lower() == "json":
92
93
  result_json = result.model_dump(mode="json")
93
94
  json_output = orjson.dumps(result_json, option=orjson.OPT_INDENT_2).decode()
94
- _cli.console.print(json_output, soft_wrap=True)
95
+ print_verbatim(json_output)
95
96
  else:
96
97
  trid_table = Table()
97
98
  trid_table.add_column("Active Task Run IDs", style="cyan", no_wrap=True)
@@ -166,7 +167,7 @@ async def ls(
166
167
  if output and output.lower() == "json":
167
168
  limits_json = [cl.model_dump(mode="json") for cl in sorted_limits]
168
169
  json_output = orjson.dumps(limits_json, option=orjson.OPT_INDENT_2).decode()
169
- _cli.console.print(json_output, soft_wrap=True)
170
+ print_verbatim(json_output)
170
171
  else:
171
172
  table = Table(
172
173
  title="Concurrency Limits",
prefect/cli/config.py CHANGED
@@ -16,7 +16,7 @@ import prefect.cli._app as _cli
16
16
  import prefect.context
17
17
  import prefect.settings
18
18
  from prefect._internal.compatibility.backports import tomllib
19
- from prefect.cli._utilities import exit_with_error, exit_with_success
19
+ from prefect.cli._utilities import exit_with_error, exit_with_success, print_verbatim
20
20
  from prefect.exceptions import ProfileSettingsValidationError
21
21
  from prefect.settings import Settings, get_current_settings
22
22
  from prefect.settings.legacy import (
@@ -361,7 +361,7 @@ def view(
361
361
  if ui_url:
362
362
  config_data["ui_url"] = ui_url
363
363
  json_output = orjson.dumps(config_data, option=orjson.OPT_INDENT_2).decode()
364
- _cli.console.print(json_output, soft_wrap=True)
364
+ print_verbatim(json_output)
365
365
  return
366
366
 
367
367
  formatted_settings = [
prefect/cli/deployment.py CHANGED
@@ -26,6 +26,7 @@ from prefect.cli._utilities import (
26
26
  exit_with_error,
27
27
  exit_with_success,
28
28
  load_json_key_values,
29
+ print_verbatim,
29
30
  with_cli_exception_handling,
30
31
  )
31
32
  from prefect.cli.flow_runs_watching import (
@@ -229,7 +230,7 @@ async def inspect(
229
230
 
230
231
  if output and output.lower() == "json":
231
232
  json_output = orjson.dumps(deployment_json, option=orjson.OPT_INDENT_2).decode()
232
- _cli.console.print(json_output, soft_wrap=True)
233
+ print_verbatim(json_output)
233
234
  else:
234
235
  _cli.console.print(Pretty(deployment_json))
235
236
 
@@ -294,7 +295,7 @@ async def ls(
294
295
  json_output = orjson.dumps(
295
296
  deployments_json, option=orjson.OPT_INDENT_2
296
297
  ).decode()
297
- _cli.console.print(json_output, soft_wrap=True)
298
+ print_verbatim(json_output)
298
299
  else:
299
300
  table = Table(
300
301
  title="Deployments",
@@ -1171,7 +1172,7 @@ async def list_schedules(
1171
1172
  for schedule in deployment.schedules
1172
1173
  ]
1173
1174
  json_output = orjson.dumps(schedules_json, option=orjson.OPT_INDENT_2).decode()
1174
- _cli.console.print(json_output, soft_wrap=True)
1175
+ print_verbatim(json_output)
1175
1176
  else:
1176
1177
  table = Table(
1177
1178
  title="Deployment Schedules",
prefect/cli/flow.py CHANGED
@@ -13,6 +13,7 @@ from rich.table import Table
13
13
  import prefect.cli._app as _cli
14
14
  from prefect.cli._utilities import (
15
15
  exit_with_error,
16
+ print_verbatim,
16
17
  with_cli_exception_handling,
17
18
  )
18
19
  from prefect.client.orchestration import get_client
@@ -70,7 +71,7 @@ async def ls(
70
71
  if output and output.lower() == "json":
71
72
  flows_json = [f.model_dump(mode="json") for f in flows]
72
73
  json_output = orjson.dumps(flows_json, option=orjson.OPT_INDENT_2).decode()
73
- _cli.console.print(json_output, soft_wrap=True)
74
+ print_verbatim(json_output)
74
75
  else:
75
76
  table = Table(title="Flows")
76
77
  table.add_column("ID", justify="right", style="cyan", no_wrap=True)
prefect/cli/flow_run.py CHANGED
@@ -31,6 +31,7 @@ from prefect._internal.control_listener import Intent
31
31
  from prefect.cli._utilities import (
32
32
  exit_with_error,
33
33
  exit_with_success,
34
+ print_verbatim,
34
35
  with_cli_exception_handling,
35
36
  )
36
37
  from prefect.cli.flow_runs_watching import watch_flow_run
@@ -198,7 +199,7 @@ async def inspect(
198
199
  json_output = orjson.dumps(
199
200
  flow_run_json, option=orjson.OPT_INDENT_2
200
201
  ).decode()
201
- _cli.console.print(json_output, soft_wrap=True)
202
+ print_verbatim(json_output)
202
203
  else:
203
204
  _cli.console.print(Pretty(flow_run))
204
205
 
@@ -312,7 +313,7 @@ async def ls(
312
313
  if output and output.lower() == "json":
313
314
  flow_runs_json = [flow_run.model_dump(mode="json") for flow_run in flow_runs]
314
315
  json_output = orjson.dumps(flow_runs_json, option=orjson.OPT_INDENT_2).decode()
315
- _cli.console.print(json_output, soft_wrap=True)
316
+ print_verbatim(json_output)
316
317
  else:
317
318
  table = Table(title="Flow Runs")
318
319
  table.add_column("ID", justify="right", style="cyan", no_wrap=True)
@@ -727,7 +728,7 @@ async def logs(
727
728
 
728
729
  if output_json:
729
730
  json_output = orjson.dumps(collected_logs, option=orjson.OPT_INDENT_2).decode()
730
- _cli.console.print(json_output, soft_wrap=True)
731
+ print_verbatim(json_output)
731
732
 
732
733
 
733
734
  @flow_run_app.command()
@@ -13,6 +13,7 @@ import prefect.cli._app as _cli
13
13
  from prefect.cli._utilities import (
14
14
  exit_with_error,
15
15
  exit_with_success,
16
+ print_verbatim,
16
17
  with_cli_exception_handling,
17
18
  )
18
19
 
@@ -58,7 +59,7 @@ async def ls(
58
59
  gcl_limit.model_dump(mode="json") for gcl_limit in gcl_limits
59
60
  ]
60
61
  json_output = orjson.dumps(gcl_limits_json, option=orjson.OPT_INDENT_2).decode()
61
- _cli.console.print(json_output, soft_wrap=True)
62
+ print_verbatim(json_output)
62
63
  else:
63
64
  table = Table(
64
65
  title="Global Concurrency Limits",
@@ -139,7 +140,7 @@ async def inspect(
139
140
  gcl_limit_json = gcl_limit.model_dump(mode="json")
140
141
  json_output = orjson.dumps(gcl_limit_json, option=orjson.OPT_INDENT_2).decode()
141
142
  if not file_path:
142
- _cli.console.print(json_output, soft_wrap=True)
143
+ print_verbatim(json_output)
143
144
  else:
144
145
  with open(file_path, "w") as f:
145
146
  f.write(json_output)
prefect/cli/profile.py CHANGED
@@ -21,6 +21,7 @@ import prefect.settings
21
21
  from prefect.cli._utilities import (
22
22
  exit_with_error,
23
23
  exit_with_success,
24
+ print_verbatim,
24
25
  with_cli_exception_handling,
25
26
  )
26
27
  from prefect.context import use_profile
@@ -61,7 +62,7 @@ def ls(
61
62
  {"name": name, "active": name == current_name} for name in profiles
62
63
  ]
63
64
  json_output = orjson.dumps(profile_data, option=orjson.OPT_INDENT_2).decode()
64
- _cli.console.print(json_output, soft_wrap=True)
65
+ print_verbatim(json_output)
65
66
  return
66
67
 
67
68
  table = Table(caption="* active profile")
@@ -311,7 +312,7 @@ def inspect(
311
312
  setting.name: value for setting, value in profiles[name].settings.items()
312
313
  }
313
314
  json_output = orjson.dumps(profile_data, option=orjson.OPT_INDENT_2).decode()
314
- _cli.console.print(json_output, soft_wrap=True)
315
+ print_verbatim(json_output)
315
316
  else:
316
317
  for setting, value in profiles[name].settings.items():
317
318
  _cli.console.print(f"{setting.name}='{value}'")
@@ -13,6 +13,7 @@ import prefect.cli._app as _cli
13
13
  from prefect.cli._utilities import (
14
14
  exit_with_error,
15
15
  exit_with_success,
16
+ print_verbatim,
16
17
  with_cli_exception_handling,
17
18
  )
18
19
  from prefect.client.orchestration import PrefectClient, get_client
@@ -110,12 +111,11 @@ async def result_storage_inspect(
110
111
 
111
112
  if block_document_id is None:
112
113
  if output and output.lower() == "json":
113
- _cli.console.print(
114
+ print_verbatim(
114
115
  orjson.dumps(
115
116
  {"default_result_storage_block_id": None},
116
117
  option=orjson.OPT_INDENT_2,
117
- ).decode(),
118
- soft_wrap=True,
118
+ ).decode()
119
119
  )
120
120
  else:
121
121
  _cli.console.print("No default result storage is configured.")
@@ -123,15 +123,14 @@ async def result_storage_inspect(
123
123
 
124
124
  block_slug = await _read_block_slug(client, block_document_id)
125
125
  if output and output.lower() == "json":
126
- _cli.console.print(
126
+ print_verbatim(
127
127
  orjson.dumps(
128
128
  {
129
129
  "default_result_storage_block_id": str(block_document_id),
130
130
  "block": block_slug,
131
131
  },
132
132
  option=orjson.OPT_INDENT_2,
133
- ).decode(),
134
- soft_wrap=True,
133
+ ).decode()
135
134
  )
136
135
  else:
137
136
  _cli.console.print(
prefect/cli/server.py CHANGED
@@ -23,6 +23,7 @@ import prefect.cli._app as _cli
23
23
  from prefect.cli._utilities import (
24
24
  exit_with_error,
25
25
  exit_with_success,
26
+ print_verbatim,
26
27
  with_cli_exception_handling,
27
28
  )
28
29
 
@@ -321,7 +322,7 @@ async def status(
321
322
  "error": str(healthcheck_exc),
322
323
  }
323
324
  if is_json:
324
- _cli.console.print(json_mod.dumps(result, indent=2))
325
+ print_verbatim(json_mod.dumps(result, indent=2))
325
326
  raise SystemExit(1)
326
327
  exit_with_error(
327
328
  f"Timed out after {timeout} seconds waiting for server "
@@ -342,7 +343,7 @@ async def status(
342
343
  result["server_version"] = server_version
343
344
 
344
345
  if is_json:
345
- _cli.console.print(json_mod.dumps(result, indent=2))
346
+ print_verbatim(json_mod.dumps(result, indent=2))
346
347
  else:
347
348
  _cli.console.print("Server is available.")
348
349
  _cli.console.print(f" API URL: {api_url}")
@@ -357,7 +358,7 @@ async def status(
357
358
  "error": str(healthcheck_exc),
358
359
  }
359
360
  if is_json:
360
- _cli.console.print(json_mod.dumps(result, indent=2))
361
+ print_verbatim(json_mod.dumps(result, indent=2))
361
362
  raise SystemExit(1)
362
363
  exit_with_error(
363
364
  f"Server is not available at {api_url}. Error: {healthcheck_exc}"
@@ -582,10 +583,7 @@ def list_services(
582
583
  "description": description,
583
584
  }
584
585
  )
585
- _cli.console.print(
586
- orjson.dumps(payload, option=orjson.OPT_INDENT_2).decode(),
587
- soft_wrap=True,
588
- )
586
+ print_verbatim(orjson.dumps(payload, option=orjson.OPT_INDENT_2).decode())
589
587
  return
590
588
 
591
589
  table = Table(title="Available Services", expand=True)
prefect/cli/task_run.py CHANGED
@@ -16,6 +16,7 @@ import prefect.cli._app as _cli
16
16
  from prefect.cli._utilities import (
17
17
  exit_with_error,
18
18
  exit_with_success,
19
+ print_verbatim,
19
20
  with_cli_exception_handling,
20
21
  )
21
22
 
@@ -81,7 +82,7 @@ async def inspect(
81
82
  json_output = orjson.dumps(
82
83
  task_run_json, option=orjson.OPT_INDENT_2
83
84
  ).decode()
84
- _cli.console.print(json_output, soft_wrap=True)
85
+ print_verbatim(json_output)
85
86
  else:
86
87
  _cli.console.print(Pretty(task_run))
87
88
 
@@ -181,7 +182,7 @@ async def ls(
181
182
  if output and output.lower() == "json":
182
183
  task_runs_json = [task_run.model_dump(mode="json") for task_run in task_runs]
183
184
  json_output = orjson.dumps(task_runs_json, option=orjson.OPT_INDENT_2).decode()
184
- _cli.console.print(json_output, soft_wrap=True)
185
+ print_verbatim(json_output)
185
186
  else:
186
187
  table = Table(title="Task Runs")
187
188
  table.add_column("ID", justify="right", style="cyan", no_wrap=True)
@@ -355,4 +356,4 @@ async def logs(
355
356
 
356
357
  if output_json:
357
358
  json_output = orjson.dumps(collected_logs, option=orjson.OPT_INDENT_2).decode()
358
- _cli.console.print(json_output, soft_wrap=True)
359
+ print_verbatim(json_output)
prefect/cli/variable.py CHANGED
@@ -13,6 +13,7 @@ import prefect.cli._app as _cli
13
13
  from prefect.cli._utilities import (
14
14
  exit_with_error,
15
15
  exit_with_success,
16
+ print_verbatim,
16
17
  with_cli_exception_handling,
17
18
  )
18
19
 
@@ -69,7 +70,7 @@ async def list_variables(
69
70
  if output and output.lower() == "json":
70
71
  variables_json = [variable.model_dump(mode="json") for variable in variables]
71
72
  json_output = orjson.dumps(variables_json, option=orjson.OPT_INDENT_2).decode()
72
- _cli.console.print(json_output, soft_wrap=True, markup=False, emoji=False)
73
+ print_verbatim(json_output)
73
74
  else:
74
75
  table = Table(
75
76
  title="Variables",
@@ -128,7 +129,7 @@ async def inspect(
128
129
  json_output = orjson.dumps(
129
130
  variable_json, option=orjson.OPT_INDENT_2
130
131
  ).decode()
131
- _cli.console.print(json_output, soft_wrap=True, markup=False, emoji=False)
132
+ print_verbatim(json_output)
132
133
  else:
133
134
  _cli.console.print(Pretty(variable))
134
135
 
@@ -142,12 +143,7 @@ async def get(name: str):
142
143
  async with get_client() as client:
143
144
  variable = await client.read_variable_by_name(name=name)
144
145
  if variable:
145
- _cli.console.print(
146
- json.dumps(variable.value),
147
- soft_wrap=True,
148
- markup=False,
149
- emoji=False,
150
- )
146
+ print_verbatim(json.dumps(variable.value))
151
147
  else:
152
148
  exit_with_error(f"Variable {name!r} not found.")
153
149
 
prefect/cli/work_pool.py CHANGED
@@ -20,6 +20,7 @@ import prefect.cli._app as _cli
20
20
  from prefect.cli._utilities import (
21
21
  exit_with_error,
22
22
  exit_with_success,
23
+ print_verbatim,
23
24
  with_cli_exception_handling,
24
25
  )
25
26
 
@@ -566,7 +567,7 @@ async def ls(
566
567
  if output and output.lower() == "json":
567
568
  pools_json = [pool.model_dump(mode="json") for pool in sorted_pools]
568
569
  json_output = orjson.dumps(pools_json, option=orjson.OPT_INDENT_2).decode()
569
- _cli.console.print(json_output, soft_wrap=True)
570
+ print_verbatim(json_output)
570
571
  else:
571
572
  table = Table(
572
573
  title="Work Pools",
@@ -636,7 +637,7 @@ async def inspect(
636
637
  json_output = orjson.dumps(
637
638
  pool_json, option=orjson.OPT_INDENT_2
638
639
  ).decode()
639
- _cli.console.print(json_output, soft_wrap=True)
640
+ print_verbatim(json_output)
640
641
  else:
641
642
  _cli.console.print(Pretty(pool))
642
643
  except ObjectNotFound:
@@ -704,7 +705,7 @@ async def slots(
704
705
  "total": total,
705
706
  }
706
707
  json_output = orjson.dumps(data, option=orjson.OPT_INDENT_2).decode()
707
- _cli.console.print(json_output, soft_wrap=True)
708
+ print_verbatim(json_output)
708
709
  return
709
710
 
710
711
  # Header
@@ -1177,7 +1178,7 @@ async def preview(
1177
1178
  if output and output.lower() == "json":
1178
1179
  runs_json = [run.model_dump(mode="json") for run in sorted_runs]
1179
1180
  json_output = orjson.dumps(runs_json, option=orjson.OPT_INDENT_2).decode()
1180
- _cli.console.print(json_output, soft_wrap=True)
1181
+ print_verbatim(json_output)
1181
1182
  return
1182
1183
 
1183
1184
  for run in sorted_runs:
@@ -1306,7 +1307,7 @@ async def storage_inspect(
1306
1307
  json_output = orjson.dumps(
1307
1308
  storage_data, option=orjson.OPT_INDENT_2
1308
1309
  ).decode()
1309
- _cli.console.print(json_output, soft_wrap=True)
1310
+ print_verbatim(json_output)
1310
1311
  else:
1311
1312
  storage_table.add_row("type", storage_type)
1312
1313
  upload_config = _get_bundle_step_config(
prefect/cli/work_queue.py CHANGED
@@ -21,6 +21,7 @@ import prefect.cli._app as _cli
21
21
  from prefect.cli._utilities import (
22
22
  exit_with_error,
23
23
  exit_with_success,
24
+ print_verbatim,
24
25
  with_cli_exception_handling,
25
26
  )
26
27
 
@@ -387,7 +388,7 @@ async def inspect(
387
388
  json_output = orjson.dumps(
388
389
  result_json, option=orjson.OPT_INDENT_2
389
390
  ).decode()
390
- _cli.console.print(json_output, soft_wrap=True)
391
+ print_verbatim(json_output)
391
392
  else:
392
393
  _cli.console.print(Pretty(result))
393
394
  except ObjectNotFound:
@@ -470,7 +471,7 @@ async def slots(
470
471
  if output and output.lower() == "json":
471
472
  data = status.model_dump(mode="json")
472
473
  json_output = orjson.dumps(data, option=orjson.OPT_INDENT_2).decode()
473
- _cli.console.print(json_output, soft_wrap=True)
474
+ print_verbatim(json_output)
474
475
  return
475
476
 
476
477
  # Header
@@ -575,7 +576,7 @@ async def ls(
575
576
  if output and output.lower() == "json":
576
577
  queues_json = [queue.model_dump(mode="json") for queue in sorted_queues]
577
578
  json_output = orjson.dumps(queues_json, option=orjson.OPT_INDENT_2)
578
- _cli.console.print(json_output.decode(), soft_wrap=True)
579
+ print_verbatim(json_output.decode())
579
580
  return
580
581
 
581
582
  for queue in sorted_queues:
@@ -620,7 +621,7 @@ async def ls(
620
621
  if output and output.lower() == "json":
621
622
  queues_json = [queue.model_dump(mode="json") for queue in sorted_queues]
622
623
  json_output = orjson.dumps(queues_json, option=orjson.OPT_INDENT_2)
623
- _cli.console.print(json_output.decode(), soft_wrap=True)
624
+ print_verbatim(json_output.decode())
624
625
  return
625
626
 
626
627
  for queue in sorted_queues:
@@ -731,7 +732,7 @@ async def preview(
731
732
  if output and output.lower() == "json":
732
733
  runs_json = [run.model_dump(mode="json") for run in sorted_runs]
733
734
  json_output = orjson.dumps(runs_json, option=orjson.OPT_INDENT_2).decode()
734
- _cli.console.print(json_output, soft_wrap=True)
735
+ print_verbatim(json_output)
735
736
  return
736
737
 
737
738
  for run in sorted_runs:
@@ -0,0 +1 @@
1
+ import{$ as e,Ai as t,Gi as n,Hi as r,Ii as i,Ji as a,Ki as o,Pi as s,S as c,Ti as l,Tt as u,Ui as d,V as f,Vn as p,Wi as m,X as h,Xi as g,Yi as _,_a as v,_i as y,ar as b,ca as x,ea as S,ia as C,ii as w,ji as T,la as E,li as D,oa as O,pa as k,ra as A,ri as j,rt as M,ta as N,ua as P,un as F,va as I,vi as L,vr as R,xi as z,ya as B,yi as V}from"./index-BD_kIOMy-DLFMAzri.js";import"./prefect-ui-library-L3Ur-jad.js";import{a as H,n as U}from"./index-Dag4OkY5.js";import{n as W,t as G}from"./useCan-DpXMWoiO.js";import{a as K,i as q,n as J,r as Y,t as X}from"./usePrefectApi-iWUyYqEQ.js";import{n as Z,r as Q}from"./uiVersion-CFl1ZjDm.js";import{t as ee}from"./useApiConfig-Df1ZZAZJ.js";var te={class:`flex gap-x-2 items-center`},ne={key:0,class:`text-sm italic`},re=`http://prefect.io/slack?utm_source=oss&utm_medium=oss&utm_campaign=oss_popup&utm_term=none&utm_content=none`,$=`join-the-community-modal`,ie=`https://getform.io/f/eapderva`,ae=g({__name:`JoinTheCommunityModal`,props:{showModal:{type:Boolean},showModalModifiers:{}},emits:[`update:showModal`],setup(t){let r=O(t,`showModal`),i=k(!1),s=k(),{validate:l,state:u}=j(s,[c(`Email`),e(`Email`)]),f=k(!1),p=k(``);async function h(){if(await l()){p.value=``,f.value=!0;try{await fetch(ie,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:s.value}),redirect:`manual`}),r.value=!1,V(`Successfully subscribed`,`success`)}catch(e){p.value=`An error occurred. Please try again.`,console.error(e)}finally{f.value=!1}}}return(e,t)=>{let c=A(`p-button`),l=A(`p-divider`),g=A(`p-text-input`),y=A(`p-label`),b=A(`p-form`),x=A(`p-message`),C=A(`p-modal`);return S(),m(C,{"show-modal":r.value,"onUpdate:showModal":t[2]||=e=>r.value=e,title:`Join the Prefect Community`},{header:P(()=>[...t[3]||=[d(`h2`,null,`Join the Community`,-1)]]),default:P(()=>[t[5]||=d(`p`,null,` Connect with 25k+ engineers scaling Python with Prefect. Show us your work and be the first to know about new Prefect features. `,-1),d(`div`,te,[_(c,{primary:``,icon:`Slack`,to:re,target:`_blank`,onClick:t[0]||=e=>i.value=!0},{default:P(()=>[...t[4]||=[a(` Join us on Slack `,-1)]]),_:1}),i.value?(S(),o(`span`,ne,` Thanks for joining our community! `)):n(``,!0)]),_(l,{class:`-my-3`}),_(b,{id:$,onSubmit:h},{default:P(()=>[_(y,{label:`Notify me about Prefect updates`,state:v(u),message:v(u).error},{default:P(({id:e})=>[_(g,{id:e,modelValue:s.value,"onUpdate:modelValue":t[1]||=e=>s.value=e,placeholder:`hello@prefect.io`,state:v(u)},null,8,[`id`,`modelValue`,`state`])]),_:1},8,[`state`,`message`])]),_:1}),p.value?(S(),m(x,{key:0,error:``},{default:P(()=>[a(B(p.value),1)]),_:1})):n(``,!0)]),cancel:P(e=>[_(c,{class:`sm:order-first`,onClick:e.close},{default:P(()=>[...t[6]||=[a(` Skip `,-1)]]),_:1},8,[`onClick`])]),actions:P(()=>[_(c,{primary:``,type:`submit`,form:$,loading:f.value},{default:P(()=>[...t[7]||=[a(` Sign up `,-1)]]),_:1},8,[`loading`])]),_:1},8,[`show-modal`])}}}),oe={key:0,href:`https://www.prefect.io/cloud-vs-oss?utm_source=oss&utm_medium=oss&utm_campaign=oss&utm_term=none&utm_content=none`,target:`_blank`},se=g({__name:`ContextSidebar`,async setup(e){let t,i,c=G(),f=X(),h=s(),g=([t,i]=E(()=>f.admin.getSettings()),t=await t,i(),t),y=r(()=>g.server.ui.show_promotional_content);localStorage.setItem(`prefect-show-promotional-content`,String(y.value));let b=r(()=>c.read.work_pool),x=k(q.settings),C=r(()=>x.value!==null&&Z(x.value,`v2`));q.loadOptional().then(e=>{x.value=e});function T(){x.value!==null&&Q(x.value,h.path)}let{showModal:D,open:O}=u(),{value:j}=w(`local`,`join-the-community-modal-dismissed`,!1);function M(e){D.value=e??!1,e||(j.value=!0)}return(e,t)=>{let r=A(`p-icon`),i=A(`router-link`),s=A(`p-button`);return S(),m(v(l),{class:`context-sidebar`},{header:P(()=>[_(i,{to:v(H).root(),class:`context-sidebar__logo-link`},{default:P(()=>[_(r,{icon:`Prefect`,class:`context-sidebar__logo-icon`})]),_:1},8,[`to`])]),footer:P(()=>[y.value?(S(),o(`a`,oe,[_(v(z),null,{default:P(()=>[t[1]||=d(`div`,null,` Ready to scale? `,-1),_(s,{primary:``,small:``,class:`context-sidebar__upgade-button`},{default:P(()=>[...t[0]||=[a(` Upgrade `,-1)]]),_:1})]),_:1})])):n(``,!0),y.value?(S(),m(v(z),{key:1,onClick:v(O)},{default:P(()=>[t[2]||=a(` Join the Community `,-1),_(ae,{"show-modal":v(D)||!v(j),"onUpdate:showModal":M},null,8,[`show-modal`])]),_:1},8,[`onClick`])):n(``,!0),_(v(z),{title:`Settings`,to:v(H).settings()},null,8,[`to`]),C.value?(S(),m(v(z),{key:2,title:`Switch to V2 UI`,onClick:T})):n(``,!0)]),default:P(()=>[_(v(z),{title:`Dashboard`,to:v(H).dashboard()},null,8,[`to`]),_(v(z),{title:`Runs`,to:v(H).runs()},null,8,[`to`]),_(v(z),{title:`Flows`,to:v(H).flows()},null,8,[`to`]),_(v(z),{title:`Deployments`,to:v(H).deployments()},null,8,[`to`]),b.value?(S(),m(v(z),{key:0,title:`Work Pools`,to:v(H).workPools()},null,8,[`to`])):n(``,!0),b.value?n(``,!0):(S(),m(v(z),{key:1,title:`Work Queues`,to:v(H).workQueues()},null,8,[`to`])),_(v(z),{title:`Blocks`,to:v(H).blocks()},null,8,[`to`]),_(v(z),{title:v(p).info.variables,to:v(H).variables()},null,8,[`title`,`to`]),_(v(z),{title:`Automations`,to:v(H).automations()},null,8,[`to`]),_(v(z),{title:`Event Feed`,to:v(H).events()},null,8,[`to`]),_(v(z),{title:`Concurrency`,to:v(H).concurrencyLimits()},null,8,[`to`])]),_:1})}}});function ce(e){let t=D(K.getFeatureFlags,[e]),n=r(()=>[...M,...t.response??[]]);return{can:R(n),pending:r(()=>t.loading)}}function le(){let e=k(!1);function t(){e.value=!e.value}function n(){e.value=!0}function r(){e.value=!1}return{mobileMenuOpen:e,open:n,close:r,toggle:t}}var ue={class:`app-router-view`},de=g({__name:`AppRouterView`,async setup(e){let a,c,l=s(),{config:u}=([a,c]=E(()=>ee(l.path)),a=await a,c(),a),{can:d}=ce(l.path),p=J(u),g=F();N(W,d),N(h,d),N(Y,p),N(b,p),N(f,g),p.admin.authCheck().then(e=>{e==401?U.currentRoute.value.name!==`login`&&(V(`Authentication failed.`,`error`,{timeout:!1}),U.push({name:`login`,query:{redirect:U.currentRoute.value.fullPath}})):p.health.isHealthy().then(e=>{e||V(`Can't connect to Server API at ${u.baseUrl}. Check that it's accessible from your machine.`,`error`,{timeout:!1})})});let{mobileMenuOpen:w,toggle:D,close:O}=le(),k=r(()=>y.lg||w.value);return x(()=>document.body.classList.toggle(`body-scrolling-disabled`,k.value&&!y.lg)),(e,r)=>{let a=A(`router-link`),s=A(`p-button`);return S(),o(`div`,ue,[!v(y).lg&&!e.$route.meta.public?(S(),m(v(t),{key:0,class:`app-router-view__mobile-menu`},{"upper-links":P(()=>[_(a,{to:v(H).root()},{default:P(()=>[_(v(L),{icon:`Prefect`,class:`app-router-view__prefect-icon`})]),_:1},8,[`to`])]),"bottom-links":P(()=>[_(s,{small:``,icon:`Bars3Icon`,class:`app-router-view__menu-icon`,onClick:v(D)},null,8,[`onClick`])]),_:1})):n(``,!0),k.value&&!e.$route.meta.public?(S(),m(se,{key:1,class:`app-router-view__sidebar`,onClick:v(O)},null,8,[`onClick`])):n(``,!0),_(v(T),{class:I([`app-router-view__view`,{"app-router-view__view--public":e.$route.meta.public}])},{default:P(({Component:e})=>[_(i,{name:`app-router-view-fade`,mode:`out-in`},{default:P(()=>[(S(),m(C(e)))]),_:2},1024)]),_:1},8,[`class`])])}}});export{de as default};