Search Options

Results per page
Sort
Preferred Languages
Advance

Results 321 - 330 of 1,094 for Fstr (0.02 sec)

  1. docs_src/request_forms/tutorial001_an_py39.py

    from typing import Annotated
    
    from fastapi import FastAPI, Form
    
    app = FastAPI()
    
    
    @app.post("/login/")
    async def login(username: Annotated[str, Form()], password: Annotated[str, Form()]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 223 bytes
    - Viewed (0)
  2. tests/test_enforce_once_required_parameter.py

    app = FastAPI()
    
    
    def _get_client_key(client_id: str = Query(...)) -> str:
        return f"{client_id}_key"
    
    
    def _get_client_tag(client_id: Optional[str] = Query(None)) -> Optional[str]:
        if client_id is None:
            return None
        return f"{client_id}_tag"
    
    
    @app.get("/foo")
    def foo_handler(
        client_key: str = Depends(_get_client_key),
        client_tag: Optional[str] = Depends(_get_client_tag),
    ):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  3. docs/em/docs/tutorial/body-nested-models.md

    * ๐Ÿ’ฝ ๐Ÿ› ๏ธ
    * ๐Ÿ’ฝ ๐Ÿ”ฌ
    * ๐Ÿง ๐Ÿงพ
    
    ## ๐ŸŽ ๐Ÿ†Ž & ๐Ÿ”ฌ
    
    โ†–๏ธ โšช๏ธโžก๏ธ ๐Ÿ˜ โญ ๐Ÿ†Ž ๐Ÿ’– `str`, `int`, `float`, โ™’๏ธ. ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ ๐ŸŒ… ๐Ÿ— โญ ๐Ÿ†Ž ๐Ÿ‘ˆ ๐Ÿ˜– โšช๏ธโžก๏ธ `str`.
    
    ๐Ÿ‘€ ๐ŸŒ ๐ŸŽ› ๐Ÿ‘† โœ”๏ธ, ๐Ÿ›’ ๐Ÿฉบ <a href="https://docs.pydantic.dev/latest/concepts/types/" class="external-link" target="_blank">Pydantic ๐Ÿ˜ ๐Ÿ†Ž</a>. ๐Ÿ‘† ๐Ÿ”œ ๐Ÿ‘€ ๐Ÿ–ผ โญ ๐Ÿ“ƒ.
    
    ๐Ÿ–ผ, `Image` ๐Ÿท ๐Ÿ‘ฅ โœ”๏ธ `url` ๐Ÿ‘, ๐Ÿ‘ฅ ๐Ÿ’ช ๐Ÿ“ฃ โšซ๏ธ โ†ฉ๏ธ `str`, Pydantic `HttpUrl`:
    
    //// tab | ๐Ÿ 3๏ธโƒฃ.6๏ธโƒฃ &amp; ๐Ÿ”›
    
    ```Python hl_lines="4  10"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  4. docs_src/settings/app01/config.py

    from pydantic_settings import BaseSettings
    
    
    class Settings(BaseSettings):
        app_name: str = "Awesome API"
        admin_email: str
        items_per_user: int = 50
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 183 bytes
    - Viewed (0)
  5. docs/em/docs/tutorial/encoder.md

    {!> ../../docs_src/encoder/tutorial001_py310.py!}
    ```
    
    ////
    
    ๐Ÿ‘‰ ๐Ÿ–ผ, โšซ๏ธ ๐Ÿ”œ ๐Ÿ—œ Pydantic ๐Ÿท `dict`, &amp; `datetime` `str`.
    
    ๐Ÿ ๐Ÿค™ โšซ๏ธ ๐Ÿ•ณ ๐Ÿ‘ˆ ๐Ÿ’ช ๐Ÿ—œ โฎ๏ธ ๐Ÿ ๐Ÿฉ <a href="https://docs.python.org/3/library/json.html#json.dumps" class="external-link" target="_blank">`json.dumps()`</a>.
    
    โšซ๏ธ ๐Ÿšซ ๐Ÿ“จ โญ• `str` โš— ๐Ÿ’ฝ ๐ŸŽป ๐Ÿ“ (๐ŸŽป). โšซ๏ธ ๐Ÿ“จ ๐Ÿ ๐Ÿฉ ๐Ÿ’ฝ ๐Ÿ“Š (โœ… `dict`) โฎ๏ธ ๐Ÿ’ฒ &amp; ๐ŸŽง-๐Ÿ’ฒ ๐Ÿ‘ˆ ๐ŸŒ ๐Ÿ”— โฎ๏ธ ๐ŸŽป.
    
    /// note
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  6. docs_src/settings/app03/config.py

    from pydantic_settings import BaseSettings
    
    
    class Settings(BaseSettings):
        app_name: str = "Awesome API"
        admin_email: str
        items_per_user: int = 50
    
        class Config:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 204 bytes
    - Viewed (0)
  7. docs/ja/docs/tutorial/encoder.md

    ๅŒๆง˜ใซใ€ใ“ใฎใƒ‡ใƒผใ‚ฟใƒ™ใƒผใ‚นใฏPydanticใƒขใƒ‡ใƒซ๏ผˆๅฑžๆ€งใ‚’ๆŒใคใ‚ชใƒ–ใ‚ธใ‚งใ‚ฏใƒˆ๏ผ‰ใ‚’ๅ—ใ‘ๅ–ใ‚‰ใšใ€`dict`ใ ใ‘ใ‚’ๅ—ใ‘ๅ–ใ‚Šใพใ™ใ€‚
    
    ใใฎใŸใ‚ใซ`jsonable_encoder`ใ‚’ไฝฟ็”จใ™ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚
    
    Pydanticใƒขใƒ‡ใƒซใฎใ‚ˆใ†ใชใ‚ชใƒ–ใ‚ธใ‚งใ‚ฏใƒˆใ‚’ๅ—ใ‘ๅ–ใ‚Šใ€JSONไบ’ๆ›็‰ˆใ‚’่ฟ”ใ—ใพใ™:
    
    ```Python hl_lines="5 22"
    {!../../docs_src/encoder/tutorial001.py!}
    ```
    
    ใ“ใฎไพ‹ใงใฏใ€Pydanticใƒขใƒ‡ใƒซใ‚’`dict`ใซใ€`datetime`ใ‚’`str`ใซๅค‰ๆ›ใ—ใพใ™ใ€‚
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  8. docs_src/request_forms/tutorial001.py

    from fastapi import FastAPI, Form
    
    app = FastAPI()
    
    
    @app.post("/login/")
    async def login(username: str = Form(), password: str = Form()):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 173 bytes
    - Viewed (0)
  9. docs_src/query_params/tutorial002.py

    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: str, q: Union[str, None] = None):
        if q:
            return {"item_id": item_id, "q": q}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 251 bytes
    - Viewed (0)
  10. scripts/mkdocs_hooks.py

        "management.md",
    ]
    
    
    @lru_cache
    def get_missing_translation_content(docs_dir: str) -> str:
        docs_dir_path = Path(docs_dir)
        missing_translation_path = docs_dir_path.parent.parent / "missing-translation.md"
        return missing_translation_path.read_text(encoding="utf-8")
    
    
    @lru_cache
    def get_mkdocs_material_langs() -> List[str]:
        material_path = Path(material.__file__).parent
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 17 21:20:31 UTC 2024
    - 5.2K bytes
    - Viewed (0)
Back to top