Search Options

Results per page
Sort
Preferred Languages
Advance

Results 911 - 920 of 1,169 for def2 (0.04 sec)

  1. docs_src/body_nested_models/tutorial006_py39.py

        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: set[str] = set()
        images: Union[list[Image], None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item):
        results = {"item_id": item_id, "item": item}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 519 bytes
    - Viewed (0)
  2. docs_src/body_nested_models/tutorial007_py310.py

        images: list[Image] | None = None
    
    
    class Offer(BaseModel):
        name: str
        description: str | None = None
        price: float
        items: list[Item]
    
    
    @app.post("/offers/")
    async def create_offer(offer: Offer):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 520 bytes
    - Viewed (0)
  3. scripts/playwright/separate_openapi_schemas/image04.py

    import subprocess
    
    from playwright.sync_api import Playwright, sync_playwright
    
    
    # Run playwright codegen to generate the code below, copy paste the sections in run()
    def run(playwright: Playwright) -> None:
        browser = playwright.chromium.launch(headless=False)
        # Update the viewport manually
        context = browser.new_context(viewport={"width": 960, "height": 1080})
        page = context.new_page()
        page.goto("http://localhost:8000/docs")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 13 09:14:46 UTC 2024
    - 1K bytes
    - Viewed (0)
  4. docs_src/schema_extra_example/tutorial005_an.py

    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(
                openapi_examples={
                    "normal": {
                        "summary": "A normal example",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 26 18:03:13 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  5. docs_src/body_multiple_params/tutorial001_an.py

    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: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)],
        q: Union[str, None] = None,
        item: Union[Item, None] = None,
    ):
        results = {"item_id": item_id}
        if q:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 639 bytes
    - Viewed (0)
  6. docs/de/docs/advanced/events.md

    Diese Funktionen können mit `async def` oder normalem `def` deklariert werden.
    
    ### `startup`-Event
    
    Um eine Funktion hinzuzufügen, die vor dem Start der Anwendung ausgeführt werden soll, deklarieren Sie diese mit dem Event `startup`:
    
    ```Python hl_lines="8"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  7. docs_src/query_params_str_validations/tutorial010.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,
            alias="item-query",
            title="Query string",
            description="Query string for the items to search in the database that have a good match",
            min_length=3,
            max_length=50,
            pattern="^fixedquery$",
            deprecated=True,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 574 bytes
    - Viewed (0)
  8. docs_src/path_operation_configuration/tutorial003.py

    
    @app.post(
        "/items/",
        response_model=Item,
        summary="Create an item",
        description="Create an item with all the information, name, description, price, tax and a set of unique tags",
    )
    async def create_item(item: Item):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 517 bytes
    - Viewed (0)
  9. docs_src/body_nested_models/tutorial006.py

        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: Set[str] = set()
        images: Union[List[Image], None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item):
        results = {"item_id": item_id, "item": item}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 530 bytes
    - Viewed (0)
  10. .gitignore

    /default.etcd
    
    # Also ignore protoc installed by hack/install-protoc.sh
    /third_party/protoc*
    
    # User cluster configs
    .kubeconfig
    
    .tags*
    
    # Version file for dockerized build
    .dockerized-kube-version-defs
    
    # Web UI
    /www/master/node_modules/
    /www/master/npm-debug.log
    /www/master/shared/config/development.json
    
    # Karma output
    /www/test_out
    
    Registered: Fri Nov 01 09:05:11 UTC 2024
    - Last Modified: Thu Feb 29 08:22:06 UTC 2024
    - 2.1K bytes
    - Viewed (0)
Back to top