Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 121 - 130 of 274 for head_item (0.08 seconds)

  1. docs_src/header_param_models/tutorial002_an_py310.py

        host: str
        save_data: bool
        if_modified_since: str | None = None
        traceparent: str | None = None
        x_tag: list[str] = []
    
    
    @app.get("/items/")
    async def read_items(headers: Annotated[CommonHeaders, Header()]):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Sep 17 18:54:10 GMT 2024
    - 432 bytes
    - Click Count (0)
  2. docs_src/header_param_models/tutorial002_py39.py

        host: str
        save_data: bool
        if_modified_since: Union[str, None] = None
        traceparent: Union[str, None] = None
        x_tag: list[str] = []
    
    
    @app.get("/items/")
    async def read_items(headers: CommonHeaders = Header()):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Sep 17 18:54:10 GMT 2024
    - 430 bytes
    - Click Count (0)
  3. docs_src/header_param_models/tutorial002_an_py39.py

        host: str
        save_data: bool
        if_modified_since: Union[str, None] = None
        traceparent: Union[str, None] = None
        x_tag: list[str] = []
    
    
    @app.get("/items/")
    async def read_items(headers: Annotated[CommonHeaders, Header()]):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Sep 17 18:54:10 GMT 2024
    - 451 bytes
    - Click Count (0)
  4. docs_src/path_params_numeric_validations/tutorial001_an_py310.py

    from typing import Annotated
    
    from fastapi import FastAPI, Path, Query
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        item_id: Annotated[int, Path(title="The ID of the item to get")],
        q: Annotated[str | None, Query(alias="item-query")] = None,
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 375 bytes
    - Click Count (0)
  5. tests/test_no_swagger_ui_redirect.py

    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    app = FastAPI(swagger_ui_oauth2_redirect_url=None)
    
    
    @app.get("/items/")
    async def read_items():
        return {"id": "foo"}
    
    
    client = TestClient(app)
    
    
    def test_swagger_ui():
        response = client.get("/docs")
        assert response.status_code == 200, response.text
        assert response.headers["content-type"] == "text/html; charset=utf-8"
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Apr 08 04:37:38 GMT 2020
    - 786 bytes
    - Click Count (0)
  6. docs_src/query_param_models/tutorial001_py310.py

        limit: int = Field(100, gt=0, le=100)
        offset: int = Field(0, ge=0)
        order_by: Literal["created_at", "updated_at"] = "created_at"
        tags: list[str] = []
    
    
    @app.get("/items/")
    async def read_items(filter_query: FilterParams = Query()):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Sep 17 18:54:10 GMT 2024
    - 422 bytes
    - Click Count (0)
  7. docs_src/separate_openapi_schemas/tutorial002_py39.py

        description: Optional[str] = None
    
    
    app = FastAPI(separate_input_output_schemas=False)
    
    
    @app.post("/items/")
    def create_item(item: Item):
        return item
    
    
    @app.get("/items/")
    def read_items() -> list[Item]:
        return [
            Item(
                name="Portal Gun",
                description="Device to travel through the multi-rick-verse",
            ),
            Item(name="Plumbus"),
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 518 bytes
    - Click Count (0)
  8. docs_src/query_param_models/tutorial002_an_py39.py

        limit: int = Field(100, gt=0, le=100)
        offset: int = Field(0, ge=0)
        order_by: Literal["created_at", "updated_at"] = "created_at"
        tags: list[str] = []
    
    
    @app.get("/items/")
    async def read_items(filter_query: Annotated[FilterParams, Query()]):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 483 bytes
    - Click Count (0)
  9. docs_src/cookie_params/tutorial001_py310.py

    from fastapi import Cookie, FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(ads_id: str | None = Cookie(default=None)):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 170 bytes
    - Click Count (0)
  10. docs_src/behind_a_proxy/tutorial001_01_py39.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/")
    def read_items():
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 122 bytes
    - Click Count (0)
Back to Top