24 matches across 6 files for func main
snippet_mode: auto · sorted by relevance
fastapi/routing.py PYTHON 7 matches · showing 5 view file →
269
270
271def _extract_endpoint_context(func: Any) -> EndpointContext:
272 """Extract endpoint context with caching to avoid repeated file I/O."""
273 func_id = id(func)
· · ·
335
336
337async def run_endpoint_function(
338 *, dependant: Dependant, values: dict[str, Any], is_coroutine: bool
339) -> Any:
· · ·
2826 include_in_schema: bool = True,
2827 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
2828 def decorator(func: DecoratedCallable) -> DecoratedCallable:
2829 self.add_route(
2830 path,
· · ·
2952 ),
2953 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
2954 def decorator(func: DecoratedCallable) -> DecoratedCallable:
2955 self.add_api_route(
2956 path,
· · ·
3065 """
3066
3067 def decorator(func: DecoratedCallable) -> DecoratedCallable:
3068 self.add_api_websocket_route(
3069 path, func, name=name, dependencies=dependencies
+ 2 more matches in this file
docs/en/docs/js/custom.js JAVASCRIPT 9 matches · showing 5 view file →
1function setupTermynal() {
2 document.querySelectorAll(".use-termynal").forEach(node => {
3 node.style.display = "block";
· · ·
12 let termynals = [];
13
14 function createTermynals() {
15 document
16 .querySelectorAll(`.${termynalActivateClass} .highlight code`)
· · ·
20 const useLines = [];
21 let buffer = [];
22 function saveBuffer() {
23 if (buffer.length) {
24 let isBlankSpace = true;
· · ·
99 }
100
101 function loadVisibleTermynals() {
102 termynals = termynals.filter(termynal => {
103 if (termynal.container.getBoundingClientRect().top - innerHeight <= 0) {
· · ·
113}
114
115function shuffle(array) {
116 var currentIndex = array.length, temporaryValue, randomIndex;
117 while (0 !== currentIndex) {
+ 4 more matches in this file
fastapi/applications.py PYTHON 5 matches view file →
1322 ),
1323 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
1324 def decorator(func: DecoratedCallable) -> DecoratedCallable:
1325 self.router.add_api_route(
1326 path,
· · ·
1422 """
1423
1424 def decorator(func: DecoratedCallable) -> DecoratedCallable:
1425 self.add_api_websocket_route(
1426 path,
· · ·
4640 self, path: str, name: str | None = None
4641 ) -> Callable[[DecoratedCallable], DecoratedCallable]:
4642 def decorator(func: DecoratedCallable) -> DecoratedCallable:
4643 self.router.add_websocket_route(path, func, name=name)
4644 return func
· · ·
4715 """
4716
4717 def decorator(func: DecoratedCallable) -> DecoratedCallable:
4718 self.add_middleware(BaseHTTPMiddleware, dispatch=func)
4719 return func
· · ·
4762 """
4763
4764 def decorator(func: DecoratedCallable) -> DecoratedCallable:
4765 self.add_exception_handler(exc_class_or_status_code, func)
4766 return func
fastapi/dependencies/models.py PYTHON 1 matches view file →
23
24
25def _impartial(func: Callable[..., Any]) -> Callable[..., Any]:
26 while isinstance(func, partial):
27 func = func.func
fastapi/cli.py PYTHON 1 matches view file →
6
7
8def main() -> None:
9 if not cli_main: # type: ignore[truthy-function]
10 message = 'To use the fastapi command, please install "fastapi[standard]":\n\n\tpip install "fastapi[standard]"\n'
tests/test_callable_endpoint.py PYTHON 1 matches view file →
5
6
7def main(some_arg, q: str | None = None):
8 return {"some_arg": some_arg, "q": q}
9
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.