Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 1,048 for strs (0.01 sec)

  1. docs_src/security/tutorial002_py39.py

    
    class User(BaseModel):
        username: str
        email: Union[str, None] = None
        full_name: Union[str, None] = None
        disabled: Union[bool, None] = None
    
    
    def fake_decode_token(token):
        return User(
            username=token + "fakedecoded", email="******@****.***", full_name="John Doe"
        )
    
    
    async def get_current_user(token: str = Depends(oauth2_scheme)):
        user = fake_decode_token(token)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 755 bytes
    - Viewed (0)
  2. docs_src/body_updates/tutorial002_py39.py

    from fastapi.encoders import jsonable_encoder
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: Union[str, None] = None
        description: Union[str, None] = None
        price: Union[float, None] = None
        tax: float = 10.5
        tags: list[str] = []
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 1K bytes
    - Viewed (0)
  3. docs_src/query_params/tutorial006_py310.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_user_item(
        item_id: str, needy: str, skip: int = 0, limit: int | None = None
    ):
        item = {"item_id": item_id, "needy": needy, "skip": skip, "limit": limit}
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 269 bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/metadata.md

    | Parameter | Type | Description |
    |------------|------|-------------|
    | `title` | `str` | The title of the API. |
    | `summary` | `str` | A short summary of the API. <small>Available since OpenAPI 3.1.0, FastAPI 0.99.0.</small> |
    | `description` | `str` | A short description of the API. It can use Markdown. |
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 5.9K bytes
    - Viewed (0)
  5. docs/ru/docs/tutorial/extra-data-types.md

        * В запросах и ответах будет представлен как `str`.
    * `datetime.datetime`:
        * Встроенный в Python `datetime.datetime`.
        * В запросах и ответах будет представлен как `str` в формате ISO 8601, например: `2008-09-15T15:53:00+05:00`.
    * `datetime.date`:
        * Встроенный в Python `datetime.date`.
        * В запросах и ответах будет представлен как `str` в формате ISO 8601, например: `2008-09-15`.
    * `datetime.time`:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Sep 30 11:24:39 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  6. docs/ko/docs/tutorial/metadata.md

    | 매개변수 | 타입 | 설명 |
    |----------|------|-------|
    | `title` | `str` | API의 제목입니다. |
    | `summary` | `str` | API에 대한 짧은 요약입니다. <small>OpenAPI 3.1.0, FastAPI 0.99.0부터 사용 가능</small> |
    | `description` | `str` | API에 대한 짧은 설명입니다. 마크다운을 사용할 수 있습니다. |
    | `version` | `string` | API의 버전입니다. OpenAPI의 버전이 아닌, 여러분의 애플리케이션의 버전을 나타냅니다. 예: `2.5.0` |
    | `terms_of_service` | `str` | API 이용 약관의 URL입니다. 제공하는 경우 URL 형식이어야 합니다. |
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/extra-data-types.md

        * In requests and responses will be represented as a `str`.
    * `datetime.datetime`:
        * A Python `datetime.datetime`.
        * In requests and responses will be represented as a `str` in ISO 8601 format, like: `2008-09-15T15:53:00+05:00`.
    * `datetime.date`:
        * Python `datetime.date`.
        * In requests and responses will be represented as a `str` in ISO 8601 format, like: `2008-09-15`.
    * `datetime.time`:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 2.7K bytes
    - Viewed (0)
  8. docs/es/docs/tutorial/extra-data-types.md

        * En requests y responses se representará como un `str`.
    * `datetime.datetime`:
        * Un `datetime.datetime` de Python.
        * En requests y responses se representará como un `str` en formato ISO 8601, como: `2008-09-15T15:53:00+05:00`.
    * `datetime.date`:
        * `datetime.date` de Python.
        * En requests y responses se representará como un `str` en formato ISO 8601, como: `2008-09-15`.
    * `datetime.time`:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 16 16:33:45 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  9. tests/test_invalid_sequence_param.py

            class Item(BaseModel):
                title: str
    
            @app.get("/items/")
            def read_items(q: dict[str, Item] = Query(default=None)):
                pass  # pragma: no cover
    
    
    def test_invalid_simple_dict():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 1.2K bytes
    - Viewed (0)
  10. docs_src/header_param_models/tutorial001_an_py310.py

    from typing import Annotated
    
    from fastapi import FastAPI, Header
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class CommonHeaders(BaseModel):
        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()]):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 392 bytes
    - Viewed (0)
Back to top