PrefectHQ
prefect
BlogDocsChangelog

Add Schema Converter for Custom Deployment SDK

#20150Merged
Comparing
custom-deployments-sdk-phase-1
(
8293da0
) with
main
(
b438dcd
)
CodSpeed Performance Gauge
0%
Untouched
2
Ignored
6

Benchmarks

Passed

bench_import_prefect_flow
benches/bench_import.py
CodSpeed Performance Gauge
0%
1.4 s1.4 s
bench_task_decorator
benches/bench_tasks.py
CodSpeed Performance Gauge
-1%
599.4 µs602.9 µs

Ignored

bench_flow_call[options0]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
+2%
169.4 ms166.1 ms
bench_task_call
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
-3%
32.1 ms33.1 ms
bench_task_submit
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
+9%
12.1 ms11.1 ms
bench_flow_decorator
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
+12%
5.7 ms5.1 ms
bench_flow_call[options1]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
0%
107.7 ms107.7 ms
bench_import_prefect
benches/bench_import.py
Ignored
CodSpeed Performance Gauge
0%
1.1 s1.1 s

Commits

Click on a commit to change the comparison range
Base
main
b438dcd
+0.19%
Add Phase 1 of Custom Deployment SDK: Schema Converter Implement JSON Schema to Python type converter for SDK generation. This module converts JSON Schema definitions (from Pydantic models) to Python type annotation strings suitable for TypedDict field definitions. Features: - Primitive types (string→str, integer→int, number→float, boolean→bool, null→None) - Array/list conversion with recursive item types - Object/dict conversion with additionalProperties variants - Union types via anyOf/oneOf with proper flattening and deduplication - Nullable patterns (T | None) - Enum → Literal conversion with repr()-based escaping - Reference resolution ($ref with #/definitions/ and #/$defs/) - Tuple conversion via prefixItems - Required vs optional field detection with default handling - Circular reference detection The converter uses bracket/quote-aware union splitting to correctly handle nested types like `list[str | int]` and `Literal['a | b']`. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
25dbabf
1 day ago
by desertaxle
-0.41%
Remove errant `pytest.ini`
b8d392f
1 day ago
by desertaxle
-0.13%
Clean up
8293da0
1 day ago
by desertaxle
© 2026 CodSpeed Technology
Home Terms Privacy Docs