- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for appends (0.03 sec)
-
fastapi/dependencies/utils.py
if isinstance(field_info, FieldInfo): field_info.annotation = type_annotation # Get Depends from type annotation if depends is not None and depends.dependency is None: # Copy `depends` before mutating it depends = copy(depends) depends = dataclasses.replace(depends, dependency=type_annotation) # Handle non-param type annotations like Request if lenient_issubclass(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 37.6K bytes - Viewed (3) -
tests/test_dependency_overrides.py
@app.get("/decorator-depends/", dependencies=[Depends(common_parameters)]) async def decorator_depends(): return {"in": "decorator-depends"} @router.get("/router-depends/") async def router_depends(commons: dict = Depends(common_parameters)): return {"in": "router-depends", "params": commons} @router.get("/router-decorator-depends/", dependencies=[Depends(common_parameters)]) async def router_decorator_depends():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 11.2K bytes - Viewed (0) -
scripts/docs.py
"""Extract visible text from a string with HTML tags.""" def __init__(self): super().__init__() self.text_parts = [] def handle_data(self, data): self.text_parts.append(data) def extract_visible_text(self, html: str) -> str: self.reset() self.text_parts = [] self.feed(html) return "".join(self.text_parts).strip()Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Dec 21 17:40:17 UTC 2025 - 16.9K bytes - Viewed (0) -
fastapi/routing.py
self.dependant = get_dependant( path=self.path_format, call=self.endpoint, scope="function" ) for depends in self.dependencies[::-1]: self.dependant.dependencies.insert( 0, get_parameterless_sub_dependant(depends=depends, path=self.path_format), ) self._flat_dependant = get_flat_dependant(self.dependant)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 174.6K bytes - Viewed (0) -
tests/benchmarks/test_general_performance.py
def sync_validated(item: ItemIn, dep: Annotated[int, Depends(dep_b)]): return ItemOut(name=item.name, value=item.value, dep=dep) @app.get("/sync/dict-no-response-model") def sync_dict_no_response_model(): return {"name": "foo", "value": 123} @app.get("/sync/dict-with-response-model", response_model=ItemOut) def sync_dict_with_response_model( dep: Annotated[int, Depends(dep_b)], ):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 20:40:26 UTC 2025 - 11.1K bytes - Viewed (0) -
tests/test_dependency_duplicates.py
@app.post("/with-duplicates") async def with_duplicates(item: Item, item2: Item = Depends(duplicate_dependency)): return [item, item2] @app.post("/no-duplicates") async def no_duplicates(item: Item, item2: Item = Depends(dependency)): return [item, item2] @app.post("/with-duplicates-sub") async def no_duplicates_sub( item: Item, sub_items: list[Item] = Depends(sub_duplicate_dependency) ): return [item, sub_items]
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 8K bytes - Viewed (0) -
fastapi/__init__.py
from .exceptions import WebSocketException as WebSocketException from .param_functions import Body as Body from .param_functions import Cookie as Cookie from .param_functions import Depends as Depends from .param_functions import File as File from .param_functions import Form as Form from .param_functions import Header as Header from .param_functions import Path as Path from .param_functions import Query as Query
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 15:19:50 UTC 2025 - 1.1K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008.py
import importlib from types import ModuleType from typing import Annotated, Any from unittest.mock import Mock, patch import pytest from fastapi import Depends, FastAPI from fastapi.testclient import TestClient @pytest.fixture( name="module", params=[ "tutorial008_py39", # Fails with `NameError: name 'DepA' is not defined` pytest.param("tutorial008_an_py39", marks=pytest.mark.xfail), ], )
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 1.4K bytes - Viewed (0) -
scripts/translate.py
skipped_paths: list[Path] = [] for p in paths_to_process: lang_path = generate_lang_path(lang=language, path=p) if lang_path.exists(): skipped_paths.append(p) continue missing_paths.append(p) print("Paths to skip:") for p in skipped_paths: print(f" - {p}") print(f"Total paths to skip: {len(skipped_paths)}") print("Paths to process:")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 19:05:53 UTC 2025 - 34.1K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial010.py
from typing import Annotated, Any from unittest.mock import Mock, patch from fastapi import Depends, FastAPI from fastapi.testclient import TestClient from docs_src.dependencies.tutorial010_py39 import get_db def test_get_db(): app = FastAPI() @app.get("/") def read_root(c: Annotated[Any, Depends(get_db)]): return {"c": str(c)} client = TestClient(app) dbsession_mock = Mock()
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 688 bytes - Viewed (0)