MCPcopy
hub / github.com/benoitc/gunicorn / get_param

Function get_param

benchmarks/dirty_bench_wsgi.py:57–64  ·  view source on GitHub ↗
(name, default, type_fn=int)

Source from the content-addressed store, hash-verified

55
56 # Helper to get query params with defaults
57 def get_param(name, default, type_fn=int):
58 values = query.get(name, [])
59 if values:
60 try:
61 return type_fn(values[0])
62 except (ValueError, TypeError):
63 return default
64 return default
65
66 # Get app path from query or use default
67 app_path = query.get('app', [BENCHMARK_APP])[0]

Callers 1

appFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected