MCPcopy Create free account
hub / github.com/encode/starlette / make_fields

Function make_fields

benchmarks/urlencoded_benchmark.py:76–79  ·  view source on GitHub ↗
(case: BenchmarkCase)

Source from the content-addressed store, hash-verified

74
75
76def make_fields(case: BenchmarkCase) -> list[tuple[str, str]]:
77 if case.percent_encoded:
78 return [(f"field {index}", f"café / {index}" * case.field_size) for index in range(case.fields)]
79 return [(f"field{index}", "x" * case.field_size) for index in range(case.fields)]
80
81
82def make_chunks(body: bytes, chunk_size: int | None) -> tuple[bytes, ...]:

Callers 2

warm_formFunction · 0.85
test_urlencoded_formFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_urlencoded_formFunction · 0.68