Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 66 for image (0.27 sec)

  1. docs_src/body_nested_models/tutorial007.py

    from fastapi import FastAPI
    from pydantic import BaseModel, HttpUrl
    
    app = FastAPI()
    
    
    class Image(BaseModel):
        url: HttpUrl
        name: str
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: Set[str] = set()
        images: Union[List[Image], None] = None
    
    
    class Offer(BaseModel):
        name: str
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 581 bytes
    - Viewed (0)
  2. docs_src/body_nested_models/tutorial004_py310.py

    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Image(BaseModel):
        url: str
        name: str
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
        tags: set[str] = set()
        image: Image | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed May 11 17:29:02 GMT 2022
    - 455 bytes
    - Viewed (0)
  3. docs_src/body_nested_models/tutorial005_py310.py

    from fastapi import FastAPI
    from pydantic import BaseModel, HttpUrl
    
    app = FastAPI()
    
    
    class Image(BaseModel):
        url: HttpUrl
        name: str
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
        tags: set[str] = set()
        image: Image | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 468 bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/body-nested-models.md

    ## Bodies of pure lists
    
    If the top level value of the JSON body you expect is a JSON `array` (a Python `list`), you can declare the type in the parameter of the function, the same as in Pydantic models:
    
    ```Python
    images: List[Image]
    ```
    
    or in Python 3.9 and above:
    
    ```Python
    images: list[Image]
    ```
    
    as in:
    
    === "Python 3.9+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  5. docs/en/docs/css/custom.css

      top: -10px;
      right: 0;
      font-size: 0.5rem;
      color: #999;
      background-color: #666;
      border-radius: 10px;
      padding: 0 10px;
      z-index: 10;
    }
    
    .announce-wrapper .sponsor-image {
      display: block;
      border-radius: 20px;
    }
    
    .announce-wrapper>div {
      min-height: 40px;
      display: flex;
      align-items: center;
    }
    
    .twitter {
      color: #00acee;
    }
    
    CSS
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Jan 28 09:53:45 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  6. docs/ko/docs/tutorial/body-nested-models.md

    {!../../../docs_src/body_nested_models/tutorial007.py!}
    ```
    
    !!! info "정보"
        `Offer`가 선택사항 `Image` 리스트를 차례로 갖는 `Item` 리스트를 어떻게 가지고 있는지 주목하세요
    
    ## 순수 리스트의 본문
    
    예상되는 JSON 본문의 최상위 값이 JSON `array`(파이썬 `list`)면, Pydantic 모델에서와 마찬가지로 함수의 매개변수에서 타입을 선언할 수 있습니다:
    
    ```Python
    images: List[Image]
    ```
    
    이를 아래처럼:
    
    ```Python hl_lines="15"
    {!../../../docs_src/body_nested_models/tutorial008.py!}
    ```
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  7. docs/em/docs/tutorial/request-files.md

    ### `UploadFile`
    
    `UploadFile` ✔️ 📄 🔢:
    
    * `filename`: `str` ⏮️ ⏮️ 📁 📛 👈 📂 (✅ `myimage.jpg`).
    * `content_type`: `str` ⏮️ 🎚 🆎 (📁 🆎 / 📻 🆎) (✅ `image/jpeg`).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  8. docs/ko/docs/tutorial/request-files.md

    ### `UploadFile`
    
    `UploadFile` 은 다음과 같은 어트리뷰트가 있습니다:
    
    * `filename` : 문자열(`str`)로 된 업로드된 파일의 파일명입니다 (예: `myimage.jpg`).
    * `content_type` : 문자열(`str`)로 된 파일 형식(MIME type / media type)입니다 (예: `image/jpeg`).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  9. docs_src/additional_responses/tutorial002.py

        response_model=Item,
        responses={
            200: {
                "content": {"image/png": {}},
                "description": "Return the JSON item or an image.",
            }
        },
    )
    async def read_item(item_id: str, img: Union[bool, None] = None):
        if img:
            return FileResponse("image.png", media_type="image/png")
        else:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 628 bytes
    - Viewed (0)
  10. docs/en/overrides/main.html

            <img class="sponsor-image" src="/img/sponsors/platform-sh-banner.png" />
          </a>
        </div>
        <div class="item">
          <a title="Deploy FastAPI on AWS with a few clicks" style="display: block; position: relative;" href="https://www.porter.run" target="_blank">
            <span class="sponsor-badge">sponsor</span>
            <img class="sponsor-image" src="/img/sponsors/porter-banner.png" />
          </a>
        </div>
    HTML
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Mar 25 23:10:11 GMT 2024
    - 4.6K bytes
    - Viewed (0)
Back to top