Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 65 for embed (0.14 sec)

  1. docs_src/body_fields/tutorial001_an_py39.py

        )
        price: float = Field(gt=0, description="The price must be greater than zero")
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Annotated[Item, Body(embed=True)]):
        results = {"item_id": item_id, "item": item}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 582 bytes
    - Viewed (0)
  2. common-protos/k8s.io/apimachinery/pkg/api/resource/generated.proto

    //
    // +protobuf=true
    // +protobuf.embed=string
    // +protobuf.options.marshal=false
    // +protobuf.options.(gogoproto.goproto_stringer)=false
    // +k8s:deepcopy-gen=true
    // +k8s:openapi-gen=true
    message Quantity {
      optional string string = 1;
    }
    
    // QuantityValue makes it possible to use a Quantity as value for a command
    // line parameter.
    //
    // +protobuf=true
    // +protobuf.embed=string
    // +protobuf.options.marshal=false
    Plain Text
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Mon Mar 11 18:43:24 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  3. docs_src/body_multiple_params/tutorial005_an.py

        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(embed=True)]):
        results = {"item_id": item_id, "item": item}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 457 bytes
    - Viewed (0)
  4. src/cmd/buildid/buildid.go

    	f, err := os.Open(file)
    	if err != nil {
    		log.Fatal(err)
    	}
    	matches, hash, err := buildid.FindAndHash(f, id, 0)
    	f.Close()
    	if err != nil {
    		log.Fatal(err)
    	}
    
    	// <= go 1.7 doesn't embed the contentID or actionID, so no slash is present
    	if !strings.Contains(id, "/") {
    		log.Fatalf("%s: build ID is a legacy format...binary too old for this tool", file)
    	}
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Jun 06 14:30:53 GMT 2022
    - 1.5K bytes
    - Viewed (0)
  5. docs/ko/docs/tutorial/body-multiple-params.md

    기본적으로 **FastAPI**는 직접 본문으로 예측할 것입니다.
    
    하지만, 만약 모델 내용에 `item `키를 가진 JSON으로 예측하길 원한다면, 추가적인 본문 매개변수를 선언한 것처럼 `Body`의 특별한 매개변수인 `embed`를 사용할 수 있습니다:
    
    ```Python hl_lines="17"
    {!../../../docs_src/body_multiple_params/tutorial005.py!}
    ```
    
    아래 처럼:
    
    ```Python
    item: Item = Body(..., embed=True)
    ```
    
    이 경우에 **FastAPI**는 본문을 아래 대신에:
    
    ```JSON hl_lines="2"
    {
        "name": "Foo",
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Feb 11 13:48:31 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  6. docs/pt/docs/tutorial/body-multiple-params.md

    Mas se você quiser que ele espere por um JSON com uma chave `item` e dentro dele os conteúdos do modelo, como ocorre ao declarar vários parâmetros de corpo, você pode usar o parâmetro especial de `Body` chamado `embed`:
    
    ```Python
    item: Item = Body(embed=True)
    ```
    
    como em:
    
    === "Python 3.10+"
    
        ```Python hl_lines="15"
        {!> ../../../docs_src/body_multiple_params/tutorial005_py310.py!}
        ```
    
    === "Python 3.8+"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/body-multiple-params.md

    ## Embed a single body parameter
    
    Let's say you only have a single `item` body parameter from a Pydantic model `Item`.
    
    By default, **FastAPI** will then expect its body directly.
    
    But if you want it to expect a JSON with a key `item` and inside of it the model contents, as it does when you declare extra body parameters, you can use the special `Body` parameter `embed`:
    
    ```Python
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 7.7K bytes
    - Viewed (0)
  8. docs_src/body_multiple_params/tutorial005_an_py310.py

    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Annotated[Item, Body(embed=True)]):
        results = {"item_id": item_id, "item": item}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 409 bytes
    - Viewed (0)
  9. docs_src/body_multiple_params/tutorial005_an_py39.py

        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(embed=True)]):
        results = {"item_id": item_id, "item": item}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 428 bytes
    - Viewed (0)
  10. docs_src/body_fields/tutorial001_an.py

        )
        price: float = Field(gt=0, description="The price must be greater than zero")
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Annotated[Item, Body(embed=True)]):
        results = {"item_id": item_id, "item": item}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 611 bytes
    - Viewed (0)
Back to top