- Sort Score
- Result 10 results
- Languages All
Results 141 - 150 of 4,280 for From (0.03 sec)
-
guava/src/com/google/common/util/concurrent/Service.java
* only valid values for {@code from} are {@linkplain State#STARTING STARTING} or {@linkplain * State#RUNNING RUNNING}. This occurs when {@link Service#stopAsync} is called. * * @param from The previous state that is being transitioned from. */ public void stopping(State from) {} /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Apr 04 09:45:04 UTC 2023 - 12.1K bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial003_an.py
from typing import Union from fastapi import Body, FastAPI from pydantic import BaseModel from typing_extensions import Annotated app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None class User(BaseModel): username: str full_name: Union[str, None] = None @app.put("/items/{item_id}") async def update_item(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 604 bytes - Viewed (0) -
fastapi/dependencies/utils.py
value_is_sequence, ) from fastapi.background import BackgroundTasks from fastapi.concurrency import ( asynccontextmanager, contextmanager_in_threadpool, ) from fastapi.dependencies.models import Dependant, SecurityRequirement from fastapi.logger import logger from fastapi.security.base import SecurityBase from fastapi.security.oauth2 import OAuth2, SecurityScopes
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 21:46:26 UTC 2024 - 34.7K bytes - Viewed (0) -
tests/test_response_code_no_body.py
import typing from fastapi import FastAPI from fastapi.responses import JSONResponse from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class JsonApiResponse(JSONResponse): media_type = "application/vnd.api+json" class Error(BaseModel): status: str title: str class JsonApiError(BaseModel): errors: typing.List[Error] @app.get( "/a",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.2K bytes - Viewed (0) -
tests/test_skip_defaults.py
from typing import Optional from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class SubModel(BaseModel): a: Optional[str] = "foo" class Model(BaseModel): x: Optional[int] = None sub: SubModel class ModelSubclass(Model): y: int z: int = 0 w: Optional[int] = None class ModelDefaults(BaseModel):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_ws_dependencies.py
import json from typing import List from fastapi import APIRouter, Depends, FastAPI, WebSocket from fastapi.testclient import TestClient from typing_extensions import Annotated def dependency_list() -> List[str]: return [] DepList = Annotated[List[str], Depends(dependency_list)] def create_dependency(name: str): def fun(deps: DepList): deps.append(name) return Depends(fun)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Jun 11 20:35:39 UTC 2023 - 2.1K bytes - Viewed (0) -
docs_src/settings/app02_an/main.py
from functools import lru_cache from fastapi import Depends, FastAPI from typing_extensions import Annotated from .config import Settings app = FastAPI() @lru_cache def get_settings(): return Settings() @app.get("/info") async def info(settings: Annotated[Settings, Depends(get_settings)]): return { "app_name": settings.app_name, "admin_email": settings.admin_email,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 456 bytes - Viewed (0) -
docs_src/cookie_param_models/tutorial001_an.py
from typing import Union from fastapi import Cookie, FastAPI from pydantic import BaseModel from typing_extensions import Annotated app = FastAPI() class Cookies(BaseModel): session_id: str fatebook_tracker: Union[str, None] = None googall_tracker: Union[str, None] = None @app.get("/items/") async def read_items(cookies: Annotated[Cookies, Cookie()]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 391 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,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 451 bytes - Viewed (0) -
docs_src/schema_extra_example/tutorial004_an.py
from typing import Union from fastapi import Body, FastAPI from pydantic import BaseModel from typing_extensions import Annotated app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None @app.put("/items/{item_id}") async def update_item( *, item_id: int, item: Annotated[ Item, Body(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jul 01 16:43:29 UTC 2023 - 965 bytes - Viewed (0)