Search Options

Results per page
Sort
Preferred Languages
Advance

Results 381 - 390 of 871 for tutorial001 (0.26 sec)

  1. docs/em/docs/advanced/templates.md

    * ๐Ÿ“ฃ `Request` ๐Ÿ”ข *โžก ๐Ÿ› ๏ธ* ๐Ÿ‘ˆ ๐Ÿ”œ ๐Ÿ“จ ๐Ÿ“„.
    * โš™๏ธ `templates` ๐Ÿ‘† โœ โœ & ๐Ÿ“จ `TemplateResponse`, ๐Ÿšถโ€โ™€๏ธ `request` 1๏ธโƒฃ ๐Ÿ”‘-๐Ÿ’ฒ ๐Ÿ‘ซ Jinja2๏ธโƒฃ "๐Ÿ”‘".
    
    ```Python hl_lines="4  11  15-18"
    {!../../docs_src/templates/tutorial001.py!}
    ```
    
    /// note
    
    ๐Ÿ‘€ ๐Ÿ‘ˆ ๐Ÿ‘† โœ”๏ธ ๐Ÿšถโ€โ™€๏ธ `request` ๐Ÿ• ๐Ÿ”‘-๐Ÿ’ฒ ๐Ÿ‘ซ ๐Ÿ”‘ Jinja2๏ธโƒฃ. , ๐Ÿ‘† โœ”๏ธ ๐Ÿ“ฃ โšซ๏ธ ๐Ÿ‘† *โžก ๐Ÿ› ๏ธ*.
    
    ///
    
    /// tip
    
    ๐Ÿ“ฃ `response_class=HTMLResponse` ๐Ÿฉบ ๐ŸŽš ๐Ÿ”œ ๐Ÿ’ช ๐Ÿ’ญ ๐Ÿ‘ˆ ๐Ÿ“จ ๐Ÿ”œ ๐Ÿ•ธ.
    
    ///
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  2. docs/em/docs/advanced/using-request-directly.md

    โœ‹๏ธ ๐Ÿ“ค ๐ŸŽฏ ๐Ÿ’ผ ๐ŸŒโ” โšซ๏ธ โš  ๐Ÿคš `Request` ๐ŸŽš.
    
    ## โš™๏ธ `Request` ๐ŸŽš ๐Ÿ”—
    
    โžก๏ธ ๐ŸŒˆ ๐Ÿ‘† ๐Ÿ’š ๐Ÿคš ๐Ÿ‘ฉโ€๐Ÿ’ป ๐Ÿ“ข ๐Ÿ“ข/๐Ÿฆ  ๐Ÿ”˜ ๐Ÿ‘† *โžก ๐Ÿ› ๏ธ ๐Ÿ”ข*.
    
    ๐Ÿ‘ˆ ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ” ๐Ÿ“จ ๐Ÿ”—.
    
    ```Python hl_lines="1  7-8"
    {!../../docs_src/using_request_directly/tutorial001.py!}
    ```
    
    ๐Ÿ“ฃ *โžก ๐Ÿ› ๏ธ ๐Ÿ”ข* ๐Ÿ”ข โฎ๏ธ ๐Ÿ†Ž โž– `Request` **FastAPI** ๐Ÿ”œ ๐Ÿ’ญ ๐Ÿšถโ€โ™€๏ธ `Request` ๐Ÿ‘ˆ ๐Ÿ”ข.
    
    /// tip
    
    ๐Ÿ—’ ๐Ÿ‘ˆ ๐Ÿ‘‰ ๐Ÿ’ผ, ๐Ÿ‘ฅ ๐Ÿ“ฃ โžก ๐Ÿ”ข โคด๏ธ ๐Ÿ“จ ๐Ÿ”ข.
    
    , โžก ๐Ÿ”ข ๐Ÿ”œ โš—, โœ”, ๐Ÿ—œ โœ” ๐Ÿ†Ž & โœ โฎ๏ธ ๐Ÿ—„.
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  3. docs/em/docs/tutorial/debugging.md

    # ๐Ÿ› ๏ธ
    
    ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ”— ๐Ÿ•น ๐Ÿ‘† ๐Ÿ‘จโ€๐ŸŽจ, ๐Ÿ–ผ โฎ๏ธ ๐ŸŽ™ ๐ŸŽ™ ๐Ÿ“Ÿ โš–๏ธ ๐Ÿ—’.
    
    ## ๐Ÿค™ `uvicorn`
    
    ๐Ÿ‘† FastAPI ๐Ÿˆธ, ๐Ÿ—„ & ๐Ÿƒ `uvicorn` ๐Ÿ”—:
    
    ```Python hl_lines="1  15"
    {!../../docs_src/debugging/tutorial001.py!}
    ```
    
    ### ๐Ÿ”ƒ `__name__ == "__main__"`
    
    ๐Ÿ‘‘ ๐ŸŽฏ `__name__ == "__main__"` โœ”๏ธ ๐Ÿ“Ÿ ๐Ÿ‘ˆ ๐Ÿ› ๏ธ ๐Ÿ•โ” ๐Ÿ‘† ๐Ÿ“ ๐Ÿค™ โฎ๏ธ:
    
    <div class="termy">
    
    ```console
    $ python myapp.py
    ```
    
    </div>
    
    โœ‹๏ธ ๐Ÿšซ ๐Ÿค™ ๐Ÿ•โ” โž•1๏ธโƒฃ ๐Ÿ“ ๐Ÿ—„ โšซ๏ธ, ๐Ÿ’–:
    
    ```Python
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  4. docs/zh/docs/tutorial/encoder.md

    //// tab | Python 3.10+
    
    ```Python hl_lines="4  21"
    {!> ../../docs_src/encoder/tutorial001_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="5  22"
    {!> ../../docs_src/encoder/tutorial001.py!}
    ```
    
    ////
    
    ๅœจ่ฟ™ไธชไพ‹ๅญไธญ๏ผŒๅฎƒๅฐ†Pydanticๆจกๅž‹่ฝฌๆขไธบ`dict`๏ผŒๅนถๅฐ†`datetime`่ฝฌๆขไธบ`str`ใ€‚
    
    ่ฐƒ็”จๅฎƒ็š„็ป“ๆžœๅŽๅฐฑๅฏไปฅไฝฟ็”จPythonๆ ‡ๅ‡†็ผ–็ ไธญ็š„<a href="https://docs.python.org/3/library/json.html#json.dumps" class="external-link" target="_blank">`json.dumps()`</a>ใ€‚
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  5. docs/pt/docs/advanced/additional-responses.md

    Por exemplo, para declarar um outro retorno com o status code `404` e um modelo do Pydantic chamado `Message`, vocรช pode escrever:
    
    ```Python hl_lines="18  22"
    {!../../docs_src/additional_responses/tutorial001.py!}
    ```
    
    /// note | "Nota"
    
    Lembre-se que vocรช deve retornar o `JSONResponse` diretamente.
    
    ///
    
    /// info | "Informaรงรฃo"
    
    A chave `model` nรฃo รฉ parte do OpenAPI.
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/response-directly.md

    For those cases, you can use the `jsonable_encoder` to convert your data before passing it to a response:
    
    ```Python hl_lines="6-7  21-22"
    {!../../docs_src/response_directly/tutorial001.py!}
    ```
    
    /// note | "Technical Details"
    
    You could also use `from starlette.responses import JSONResponse`.
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_custom_docs_ui/test_tutorial001.py

    
    @pytest.fixture(scope="module")
    def client():
        static_dir: Path = Path(os.getcwd()) / "static"
        print(static_dir)
        static_dir.mkdir(exist_ok=True)
        from docs_src.custom_docs_ui.tutorial001 import app
    
        with TestClient(app) as client:
            yield client
        static_dir.rmdir()
    
    
    def test_swagger_ui_html(client: TestClient):
        response = client.get("/docs")
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Thu May 23 22:59:02 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  8. docs/pt/docs/tutorial/cookie-param-models.md

    ```
    
    ////
    
    //// tab | Python 3.8+ non-Annotated
    
    /// tip | Dica
    
    Prefira utilizar a versรฃo `Annotated` se possรญvel.
    
    ///
    
    ```Python hl_lines="9-12  16"
    {!> ../../docs_src/cookie_param_models/tutorial001.py!}
    ```
    
    ////
    
    O **FastAPI** irรก **extrair** os dados para **cada campo** dos **cookies** recebidos na requisiรงรฃo e lhe fornecer o modelo Pydantic que vocรช definiu.
    
    ## Verifique os Documentos
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Mon Oct 07 20:18:07 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  9. docs/ja/docs/tutorial/handling-errors.md

    **"404 Not Found"** ใฎใ‚จใƒฉใƒผ๏ผˆใŠใ‚ˆใณใ‚ธใƒงใƒผใ‚ฏ๏ผ‰ใ‚’่ฆšใˆใฆใ„ใพใ™ใ‹๏ผŸ
    
    ## `HTTPException`ใฎไฝฟ็”จ
    
    HTTPใƒฌใ‚นใƒใƒณใ‚นใ‚’ใ‚จใƒฉใƒผใงใ‚ฏใƒฉใ‚คใ‚ขใƒณใƒˆใซ่ฟ”ใ™ใซใฏใ€`HTTPException`ใ‚’ไฝฟ็”จใ—ใพใ™ใ€‚
    
    ### `HTTPException`ใฎใ‚คใƒณใƒใƒผใƒˆ
    
    ```Python hl_lines="1"
    {!../../docs_src/handling_errors/tutorial001.py!}
    ```
    
    ### ใ‚ณใƒผใƒ‰ๅ†…ใงใฎ`HTTPException`ใฎ็™บ็”Ÿ
    
    `HTTPException`ใฏ้€šๅธธใฎPythonใฎไพ‹ๅค–ใงใ‚ใ‚Šใ€APIใซ้–ข้€ฃใ™ใ‚‹ใƒ‡ใƒผใ‚ฟใ‚’่ฟฝๅŠ ใ—ใŸใ‚‚ใฎใงใ™ใ€‚
    
    Pythonใฎไพ‹ๅค–ใชใฎใงใ€`return`ใงใฏใชใใ€`raise`ใงใ™ใ€‚
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  10. docs/ja/docs/tutorial/dependencies/index.md

    ใใ—ใฆใ€ใ“ใ‚Œใ‚‰ใฎๅ€คใ‚’ๅซใ‚€`dict`ใ‚’่ฟ”ใ—ใพใ™ใ€‚
    
    ### `Depends`ใฎใ‚คใƒณใƒใƒผใƒˆ
    
    ```Python hl_lines="3"
    {!../../docs_src/dependencies/tutorial001.py!}
    ```
    
    ### "dependant"ใงใฎไพๅญ˜้–ขไฟ‚ใฎๅฎฃ่จ€
    
    *path operation้–ขๆ•ฐ*ใฎใƒ‘ใƒฉใƒกใƒผใ‚ฟใซ`Body`ใ‚„`Query`ใชใฉใ‚’ไฝฟ็”จใ™ใ‚‹ใฎใจๅŒใ˜ใ‚ˆใ†ใซใ€ๆ–ฐใ—ใ„ใƒ‘ใƒฉใƒกใƒผใ‚ฟใซ`Depends`ใ‚’ไฝฟ็”จใ™ใ‚‹ใ“ใจใŒใงใใพใ™:
    
    ```Python hl_lines="13  18"
    {!../../docs_src/dependencies/tutorial001.py!}
    ```
    
    ้–ขๆ•ฐใฎใƒ‘ใƒฉใƒกใƒผใ‚ฟใซ`Depends`ใ‚’ไฝฟ็”จใ™ใ‚‹ใฎใฏ`Body`ใ‚„`Query`ใชใฉใจๅŒใ˜ใงใ™ใŒใ€`Depends`ใฎๅ‹•ไฝœใฏๅฐ‘ใ—็•ฐใชใ‚Šใพใ™ใ€‚
    
    `Depends`ใฏ๏ผ‘ใคใฎใƒ‘ใƒฉใƒกใƒผใ‚ฟใ—ใ‹ไธŽใˆใ‚‰ใ‚Œใพใ›ใ‚“ใ€‚
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.7K bytes
    - Viewed (0)
Back to top