Search Options

Results per page
Sort
Preferred Languages
Advance

Results 241 - 250 of 874 for tutorial001 (0.1 sec)

  1. docs/de/docs/tutorial/dependencies/classes-as-dependencies.md

    ```
    
    ////
    
    //// tab | Python 3.8+ nicht annotiert
    
    /// tip | "Tipp"
    
    Bevorzugen Sie die `Annotated`-Version, falls mรถglich.
    
    ///
    
    ```Python hl_lines="11"
    {!> ../../docs_src/dependencies/tutorial001.py!}
    ```
    
    ////
    
    Aber dann haben wir ein `dict` im Parameter `commons` der *Pfadoperation-Funktion*.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 12K bytes
    - Viewed (0)
  2. docs/em/docs/tutorial/path-params.md

    ```Python hl_lines="16"
    {!../../docs_src/path_params/tutorial005.py!}
    ```
    
    ### โœ… ๐Ÿฉบ
    
    โ†ฉ๏ธ ๐Ÿ’ช ๐Ÿ’ฒ *โžก ๐Ÿ”ข* ๐Ÿ”ข, ๐ŸŽ“ ๐Ÿฉบ ๐Ÿ’ช ๐ŸŽฆ ๐Ÿ‘ซ ๐ŸŽ†:
    
    <img src="/img/tutorial/path-params/image03.png">
    
    ### ๐Ÿ‘ท โฎ๏ธ ๐Ÿ *๐Ÿ”ข*
    
    ๐Ÿ’ฒ *โžก ๐Ÿ”ข* ๐Ÿ”œ *๐Ÿ”ข ๐Ÿ‘จโ€๐ŸŽ“*.
    
    #### ๐Ÿ”ฌ *๐Ÿ”ข ๐Ÿ‘จโ€๐ŸŽ“*
    
    ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ”ฌ โšซ๏ธ โฎ๏ธ *๐Ÿ”ข ๐Ÿ‘จโ€๐ŸŽ“* ๐Ÿ‘† โœ ๐Ÿ”ข `ModelName`:
    
    ```Python hl_lines="17"
    {!../../docs_src/path_params/tutorial005.py!}
    ```
    
    #### ๐Ÿคš *๐Ÿ”ข ๐Ÿ’ฒ*
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_behind_a_proxy/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.behind_a_proxy.tutorial001 import app
    
    client = TestClient(app, root_path="/api/v1")
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
        assert response.json() == {"message": "Hello World", "root_path": "/api/v1"}
    
    
    def test_openapi():
        response = client.get("/openapi.json")
        assert response.status_code == 200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_websockets/test_tutorial001.py

    import pytest
    from fastapi.testclient import TestClient
    from fastapi.websockets import WebSocketDisconnect
    
    from docs_src.websockets.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/")
        assert response.status_code == 200, response.text
        assert b"<!DOCTYPE html>" in response.content
    
    
    def test_websocket():
        with pytest.raises(WebSocketDisconnect):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 10 09:08:19 UTC 2020
    - 822 bytes
    - Viewed (0)
  5. docs/zh/docs/advanced/custom-response.md

    ///
    
    ```Python hl_lines="2 7"
    {!../../docs_src/custom_response/tutorial001.py!}
    ```
    
    /// tip | "ๅฐ่ดดๅฃซ"
    
    `ORJSONResponse` ๅฏ่ƒฝๆ˜ฏไธ€ไธชๆ›ดๅฟซ็š„้€‰ๆ‹ฉใ€‚
    
    ///
    
    ### `RedirectResponse`
    
    ่ฟ”ๅ›ž HTTP ้‡ๅฎšๅ‘ใ€‚้ป˜่ฎคๆƒ…ๅ†ตไธ‹ไฝฟ็”จ 307 ็Šถๆ€ไปฃ็ ๏ผˆไธดๆ—ถ้‡ๅฎšๅ‘๏ผ‰ใ€‚
    
    ```Python hl_lines="2  9"
    {!../../docs_src/custom_response/tutorial006.py!}
    ```
    
    ### `StreamingResponse`
    
    ้‡‡็”จๅผ‚ๆญฅ็”Ÿๆˆๅ™จๆˆ–ๆ™ฎ้€š็”Ÿๆˆๅ™จ/่ฟญไปฃๅ™จ๏ผŒ็„ถๅŽๆตๅผไผ ่พ“ๅ“ๅบ”ไธปไฝ“ใ€‚
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  6. docs/em/docs/advanced/openapi-callbacks.md

    {!../../docs_src/openapi_callbacks/tutorial001.py!}
    ```
    
    ### โœ โฒ *โžก ๐Ÿ› ๏ธ*
    
    โœ โฒ *โžก ๐Ÿ› ๏ธ* โš™๏ธ ๐ŸŽ `APIRouter` ๐Ÿ‘† โœ ๐Ÿ”›.
    
    โšซ๏ธ ๐Ÿ”œ ๐Ÿ‘€ ๐Ÿ’– ๐Ÿ˜ FastAPI *โžก ๐Ÿ› ๏ธ*:
    
    * โšซ๏ธ ๐Ÿ”œ ๐ŸŽฒ โœ”๏ธ ๐Ÿ“„ ๐Ÿ’ช โšซ๏ธ ๐Ÿ”œ ๐Ÿ“จ, โœ… `body: InvoiceEvent`.
    *  &amp; โšซ๏ธ ๐Ÿ’ช โœ”๏ธ ๐Ÿ“„ ๐Ÿ“จ โšซ๏ธ ๐Ÿ”œ ๐Ÿ“จ, โœ… `response_model=InvoiceEventReceived`.
    
    ```Python hl_lines="16-18  21-22  28-32"
    {!../../docs_src/openapi_callbacks/tutorial001.py!}
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_first_steps/test_tutorial001.py

    import pytest
    from fastapi.testclient import TestClient
    
    from docs_src.first_steps.tutorial001 import app
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        "path,expected_status,expected_response",
        [
            ("/", 200, {"message": "Hello World"}),
            ("/nonexistent", 404, {"detail": "Not Found"}),
        ],
    )
    def test_get_path(path, expected_status, expected_response):
        response = client.get(path)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  8. docs/pt/docs/advanced/behind-a-proxy.md

    Nesse caso, o caminho original `/app` seria servido em `/api/v1/app`.
    
    Embora todo o seu cรณdigo esteja escrito assumindo que existe apenas `/app`.
    
    {* ../../docs_src/behind_a_proxy/tutorial001.py hl[6] *}
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 15:28:18 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  9. docs/em/docs/tutorial/body-fields.md

    ## ๐Ÿ—„ `Field`
    
    ๐Ÿฅ‡, ๐Ÿ‘† โœ”๏ธ ๐Ÿ—„ โšซ๏ธ:
    
    //// tab | ๐Ÿ 3๏ธโƒฃ.6๏ธโƒฃ &amp; ๐Ÿ”›
    
    ```Python hl_lines="4"
    {!> ../../docs_src/body_fields/tutorial001.py!}
    ```
    
    ////
    
    //// tab | ๐Ÿ 3๏ธโƒฃ.1๏ธโƒฃ0๏ธโƒฃ &amp; ๐Ÿ”›
    
    ```Python hl_lines="2"
    {!> ../../docs_src/body_fields/tutorial001_py310.py!}
    ```
    
    ////
    
    /// warning
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  10. docs/de/docs/tutorial/response-status-code.md

    Schauen wir uns das vorherige Beispiel noch einmal an:
    
    {* ../../docs_src/response_status_code/tutorial001.py hl[6] *}
    
    `201` ist der Statuscode fรผr โ€žCreatedโ€œ (โ€žErzeugtโ€œ).
    
    Aber Sie mรผssen sich nicht daran erinnern, welcher dieser Codes was bedeutet.
    
    Sie kรถnnen die Hilfsvariablen von `fastapi.status` verwenden.
    
    {* ../../docs_src/response_status_code/tutorial002.py hl[1,6] *}
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 16:59:43 UTC 2024
    - 4.6K bytes
    - Viewed (0)
Back to top