Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 371 - 380 of 795 for asyncId (0.05 seconds)

  1. docs_src/bigger_applications/app_an_py310/main.py

    app.include_router(
        admin.router,
        prefix="/admin",
        tags=["admin"],
        dependencies=[Depends(get_token_header)],
        responses={418: {"description": "I'm a teapot"}},
    )
    
    
    @app.get("/")
    async def root():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 552 bytes
    - Click Count (0)
  2. .teamcity/src/main/kotlin/model/PerformanceTestSpec.kt

                        if (os == Os.WINDOWS) {
                            listOf("jprofiler")
                        } else {
                            listOf("async-profiler", "async-profiler-heap")
                        }.map { FlameGraphGenerationBuildSpec(scenario, os, arch, it) }
                    }
                }
    
        inner class FlameGraphGenerationBuildSpec(
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Wed Feb 12 09:12:03 GMT 2025
    - 3.8K bytes
    - Click Count (0)
  3. docs_src/additional_responses/tutorial001_py310.py

    class Item(BaseModel):
        id: str
        value: str
    
    
    class Message(BaseModel):
        message: str
    
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}", response_model=Item, responses={404: {"model": Message}})
    async def read_item(item_id: str):
        if item_id == "foo":
            return {"id": "foo", "value": "there goes my hero"}
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 506 bytes
    - Click Count (0)
  4. docs_src/path_params/tutorial005_py310.py

    from fastapi import FastAPI
    
    
    class ModelName(str, Enum):
        alexnet = "alexnet"
        resnet = "resnet"
        lenet = "lenet"
    
    
    app = FastAPI()
    
    
    @app.get("/models/{model_name}")
    async def get_model(model_name: ModelName):
        if model_name is ModelName.alexnet:
            return {"model_name": model_name, "message": "Deep Learning FTW!"}
    
        if model_name.value == "lenet":
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 546 bytes
    - Click Count (0)
  5. docs/ru/docs/tutorial/background-tasks.md

    Это обычная функция, которая может принимать параметры.
    
    Это может быть как `async def`, так и обычная функция `def`, **FastAPI** знает, как корректно её выполнить.
    
    В этом случае функция задачи будет записывать данные в файл (имитируя отправку письма).
    
    Так как операция записи не использует `async` и `await`, мы определим функцию как обычную `def`:
    
    {* ../../docs_src/background_tasks/tutorial001_py310.py hl[6:9] *}
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:56:20 GMT 2026
    - 7.5K bytes
    - Click Count (0)
  6. docs_src/async_tests/app_a_py310/main.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    async def root():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 112 bytes
    - Click Count (0)
  7. docs_src/response_model/tutorial003_py310.py

        email: EmailStr
        full_name: str | None = None
    
    
    class UserOut(BaseModel):
        username: str
        email: EmailStr
        full_name: str | None = None
    
    
    @app.post("/user/", response_model=UserOut)
    async def create_user(user: UserIn) -> Any:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Jan 07 13:45:48 GMT 2023
    - 431 bytes
    - Click Count (0)
  8. docs_src/dependencies/tutorial011_an_py310.py

        def __call__(self, q: str = ""):
            if q:
                return self.fixed_content in q
            return False
    
    
    checker = FixedContentQueryChecker("bar")
    
    
    @app.get("/query-checker/")
    async def read_query_check(fixed_content_included: Annotated[bool, Depends(checker)]):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 544 bytes
    - Click Count (0)
  9. docs_src/path_operation_advanced_configuration/tutorial002_py310.py

    from fastapi import FastAPI
    from fastapi.routing import APIRoute
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items():
        return [{"item_id": "Foo"}]
    
    
    def use_route_names_as_operation_ids(app: FastAPI) -> None:
        """
        Simplify operation IDs so that generated API clients have simpler function
        names.
    
        Should be called only after all routes have been added.
        """
        for route in app.routes:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 572 bytes
    - Click Count (0)
  10. docs_src/path_operation_advanced_configuration/tutorial006_py310.py

                                "description": {"type": "string"},
                            },
                        }
                    }
                },
                "required": True,
            },
        },
    )
    async def create_item(request: Request):
        raw_body = await request.body()
        data = magic_data_reader(raw_body)
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 1K bytes
    - Click Count (0)
Back to Top