Search Options

Results per page
Sort
Preferred Languages
Advance

Results 391 - 400 of 874 for tutorial001 (0.1 sec)

  1. docs/en/docs/tutorial/metadata.md

    You can set them as follows:
    
    ```Python hl_lines="3-16  19-32"
    {!../../docs_src/metadata/tutorial001.py!}
    ```
    
    /// tip
    
    You can write Markdown in the `description` field and it will be rendered in the output.
    
    ///
    
    With this configuration, the automatic API docs would look like:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_handling_errors/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.handling_errors.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_get_item():
        response = client.get("/items/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"item": "The Foo Wrestlers"}
    
    
    def test_get_item_not_found():
        response = client.get("/items/bar")
        assert response.status_code == 404, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  3. docs/de/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!}
    ```
    
    ////
    
    In diesem Beispiel wird das Pydantic-Modell in ein `dict`, und das `datetime`-Objekt in ein `str` konvertiert.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  4. docs/em/docs/advanced/testing-dependencies.md

    ๐Ÿ” ๐Ÿ”— ๐Ÿ”ฌ, ๐Ÿ‘† ๐Ÿšฎ ๐Ÿ”‘ โฎ๏ธ ๐Ÿ”— (๐Ÿ”ข), & ๐Ÿ’ฒ, ๐Ÿ‘† ๐Ÿ”— ๐Ÿ” (โž•1๏ธโƒฃ ๐Ÿ”ข).
    
    & โคด๏ธ **FastAPI** ๐Ÿ”œ ๐Ÿค™ ๐Ÿ‘ˆ ๐Ÿ” โ†ฉ๏ธ โฎ๏ธ ๐Ÿ”—.
    
    ```Python hl_lines="28-29  32"
    {!../../docs_src/dependency_testing/tutorial001.py!}
    ```
    
    /// tip
    
    ๐Ÿ‘† ๐Ÿ’ช โš’ ๐Ÿ”— ๐Ÿ” ๐Ÿ”— โš™๏ธ ๐Ÿ™† ๐Ÿ‘† **FastAPI** ๐Ÿˆธ.
    
    โฎ๏ธ ๐Ÿ”— ๐Ÿ’ช โš™๏ธ *โžก ๐Ÿ› ๏ธ ๐Ÿ”ข*, *โžก ๐Ÿ› ๏ธ ๐Ÿ‘จโ€๐ŸŽจ* (๐Ÿ•โ” ๐Ÿ‘† ๐Ÿšซ โš™๏ธ ๐Ÿ“จ ๐Ÿ’ฒ), `.include_router()` ๐Ÿค™, โ™’๏ธ.
    
    FastAPI ๐Ÿ”œ ๐Ÿ’ช ๐Ÿ” โšซ๏ธ.
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  5. docs/ru/docs/tutorial/dependencies/index.md

    //// tab | Python 3.8+ non-Annotated
    
    /// tip | "ะŸะพะดัะบะฐะทะบะฐ"
    
    ะะฐัั‚ะพัั‚ะตะปัŒะฝะพ ั€ะตะบะพะผะตะฝะดัƒะตะผ ะธัะฟะพะปัŒะทะพะฒะฐั‚ัŒ `Annotated` ะฒะตั€ัะธัŽ ะฝะฐัะบะพะปัŒะบะพ ัั‚ะพ ะฒะพะทะผะพะถะฝะพ.
    
    ///
    
    ```Python hl_lines="8-11"
    {!> ../../docs_src/dependencies/tutorial001.py!}
    ```
    
    ////
    
    **ะ˜ ะฒัั‘.**
    
    **2 ัั‚ั€ะพะบะธ.**
    
    ะ˜ ั‚ะตะฟะตั€ัŒ ะพะฝะฐ ั‚ะพะน ะถะต ั„ะพั€ะผั‹ ะธ ัั‚ั€ัƒะบั‚ัƒั€ั‹, ั‡ั‚ะพ ะธ ะฒัะต ะฒะฐัˆะธ *ั„ัƒะฝะบั†ะธะธ ะพะฑั€ะฐะฑะพั‚ะบะธ ะฟัƒั‚ะธ*.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  6. docs/em/docs/advanced/response-directly.md

    ๐Ÿ“š ๐Ÿ’ผ, ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ `jsonable_encoder` ๐Ÿ—œ ๐Ÿ‘† ๐Ÿ“Š โญ ๐Ÿšถโ€โ™€๏ธ โšซ๏ธ ๐Ÿ“จ:
    
    ```Python hl_lines="6-7  21-22"
    {!../../docs_src/response_directly/tutorial001.py!}
    ```
    
    /// note | "๐Ÿ“ก โ„น"
    
    ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ `from starlette.responses import JSONResponse`.
    
    **FastAPI** ๐Ÿšš ๐ŸŽ `starlette.responses` `fastapi.responses` ๐Ÿช ๐Ÿ‘†, ๐Ÿ‘ฉโ€๐Ÿ’ป. โœ‹๏ธ ๐ŸŒ… ๐Ÿ’ช ๐Ÿ“จ ๐Ÿ‘Ÿ ๐Ÿ”— โšช๏ธโžก๏ธ ๐Ÿ’ƒ.
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/middleware.md

    {* ../../docs_src/advanced_middleware/tutorial001.py hl[2,6] *}
    
    ## `TrustedHostMiddleware`
    
    Enforces that all incoming requests have a correctly set `Host` header, in order to guard against HTTP Host Header attacks.
    
    {* ../../docs_src/advanced_middleware/tutorial002.py hl[2,6:8] *}
    
    The following arguments are supported:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 16:45:50 UTC 2024
    - 4K bytes
    - Viewed (0)
  8. docs/em/docs/tutorial/extra-models.md

    ///
    
    ## ๐Ÿ’— ๐Ÿท
    
    ๐Ÿ“ฅ ๐Ÿข ๐Ÿ’ญ โ” ๐Ÿท ๐Ÿ’ช ๐Ÿ‘€ ๐Ÿ’– โฎ๏ธ ๐Ÿ‘ซ ๐Ÿ” ๐Ÿ‘ & ๐Ÿฅ‰ ๐ŸŒโ” ๐Ÿ‘ซ โš™๏ธ:
    
    //// tab | ๐Ÿ 3๏ธโƒฃ.6๏ธโƒฃ & ๐Ÿ”›
    
    ```Python hl_lines="9  11  16  22  24  29-30  33-35  40-41"
    {!> ../../docs_src/extra_models/tutorial001.py!}
    ```
    
    ////
    
    //// tab | ๐Ÿ 3๏ธโƒฃ.1๏ธโƒฃ0๏ธโƒฃ & ๐Ÿ”›
    
    ```Python hl_lines="7  9  14  20  22  27-28  31-33  38-39"
    {!> ../../docs_src/extra_models/tutorial001_py310.py!}
    ```
    
    ////
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  9. 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`ใซๅค‰ๆ›ใ—ใพใ™ใ€‚
    
    ๅ‘ผใณๅ‡บใ—ใŸ็ตๆžœใฏใ€Pythonใฎๆจ™ๆบ–ใฎ<a href="https://docs.python.org/3/library/json.html#json.dumps" class="external-link" target="_blank">`json.dumps()`</a>ใงใ‚จใƒณใ‚ณใƒผใƒ‰ใงใใ‚‹ใ‚‚ใฎใงใ™ใ€‚
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/static-files.md

    # ๐ŸŽป ๐Ÿ“
    
    ๐Ÿ‘† ๐Ÿ’ช ๐Ÿฆ ๐ŸŽป ๐Ÿ“ ๐Ÿ” โšช๏ธโžก๏ธ ๐Ÿ“ โš™๏ธ `StaticFiles`.
    
    ## โš™๏ธ `StaticFiles`
    
    * ๐Ÿ—„ `StaticFiles`.
    * "๐Ÿ—ป" `StaticFiles()` ๐Ÿ‘ ๐ŸŽฏ โžก.
    
    ```Python hl_lines="2  6"
    {!../../docs_src/static_files/tutorial001.py!}
    ```
    
    /// note | "๐Ÿ“ก โ„น"
    
    ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ `from starlette.staticfiles import StaticFiles`.
    
    **FastAPI** ๐Ÿšš ๐ŸŽ `starlette.staticfiles` `fastapi.staticfiles` ๐Ÿช ๐Ÿ‘†, ๐Ÿ‘ฉโ€๐Ÿ’ป. โœ‹๏ธ โšซ๏ธ ๐Ÿค™ ๐Ÿ‘Ÿ ๐Ÿ”— โšช๏ธโžก๏ธ ๐Ÿ’ƒ.
    
    ///
    
    ### โšซ๏ธโ” "๐Ÿ—œ"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.3K bytes
    - Viewed (0)
Back to top