- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 183 for Lyding (0.47 sec)
-
docs_src/query_params_str_validations/tutorial007_an.py
from typing import Union from fastapi import FastAPI, Query from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[Union[str, None], Query(title="Query string", min_length=3)] = None, ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 379 bytes - Viewed (0) -
docs_src/dependencies/tutorial005_an.py
from typing import Union from fastapi import Cookie, Depends, FastAPI from typing_extensions import Annotated app = FastAPI() def query_extractor(q: Union[str, None] = None): return q def query_or_cookie_extractor( q: Annotated[str, Depends(query_extractor)], last_query: Annotated[Union[str, None], Cookie()] = None, ): if not q: return last_query return q @app.get("/items/")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 558 bytes - Viewed (0) -
docs_src/extra_data_types/tutorial001_an.py
from datetime import datetime, time, timedelta from typing import Union from uuid import UUID from fastapi import Body, FastAPI from typing_extensions import Annotated app = FastAPI() @app.put("/items/{item_id}") async def read_items( item_id: UUID, start_datetime: Annotated[datetime, Body()], end_datetime: Annotated[datetime, Body()], process_after: Annotated[timedelta, Body()],
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Apr 19 00:11:40 GMT 2024 - 830 bytes - Viewed (0) -
docs_src/header_params/tutorial002_an_py39.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 288 bytes - Viewed (0) -
fastapi/types.py
import types from enum import Enum from typing import Any, Callable, Dict, Set, Type, TypeVar, Union from pydantic import BaseModel DecoratedCallable = TypeVar("DecoratedCallable", bound=Callable[..., Any]) UnionType = getattr(types, "UnionType", Union) ModelNameMap = Dict[Union[Type[BaseModel], Type[Enum]], str]
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Dec 12 00:29:03 GMT 2023 - 383 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial007_an_py310.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 337 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial004.py
from typing import Union from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Union[str, None] = Query( default=None, min_length=3, max_length=50, pattern="^fixedquery$" ), ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 367 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial004_an_py310.py
from typing import Annotated from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[ str | None, Query(min_length=3, max_length=50, pattern="^fixedquery$") ] = None, ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 368 bytes - Viewed (0) -
docs_src/settings/app03_an/main.py
from functools import lru_cache from typing import Annotated from fastapi import Depends, FastAPI from . import config app = FastAPI() @lru_cache def get_settings(): return config.Settings() @app.get("/info") async def info(settings: Annotated[config.Settings, Depends(get_settings)]): return { "app_name": settings.app_name, "admin_email": settings.admin_email,
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 451 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial008_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[ Union[str, None], Query( title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, ), ] = None, ):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 511 bytes - Viewed (0)