Search Options

Results per page
Sort
Preferred Languages
Advance

Results 321 - 330 of 871 for tutorial001 (0.11 sec)

  1. docs/en/docs/tutorial/dependencies/index.md

    ```
    
    ////
    
    //// tab | Python 3.8+ non-Annotated
    
    /// tip
    
    Prefer to use the `Annotated` version if possible.
    
    ///
    
    ```Python hl_lines="8-11"
    {!> ../../docs_src/dependencies/tutorial001.py!}
    ```
    
    ////
    
    That's it.
    
    **2 lines**.
    
    And it has the same shape and structure that all your *path operation functions* have.
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/wsgi.md

    ## Using `WSGIMiddleware`
    
    You need to import `WSGIMiddleware`.
    
    Then wrap the WSGI (e.g. Flask) app with the middleware.
    
    And then mount that under a path.
    
    ```Python hl_lines="2-3  23"
    {!../../docs_src/wsgi/tutorial001.py!}
    ```
    
    ## Check it
    
    Now, every request under the path `/v1/` will be handled by the Flask application.
    
    And the rest will be handled by **FastAPI**.
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_configure_swagger_ui/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.configure_swagger_ui.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_swagger_ui():
        response = client.get("/docs")
        assert response.status_code == 200, response.text
        assert (
            '"syntaxHighlight": false' in response.text
        ), "syntaxHighlight should be included and converted to JSON"
        assert (
            '"dom_id": "#swagger-ui"' in response.text
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sat Aug 19 19:54:04 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_sub_applications/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.sub_applications.tutorial001 import app
    
    client = TestClient(app)
    
    openapi_schema_main = {
        "openapi": "3.1.0",
        "info": {"title": "FastAPI", "version": "0.1.0"},
        "paths": {
            "/app": {
                "get": {
                    "responses": {
                        "200": {
                            "description": "Successful Response",
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  5. 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 Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  6. docs/em/docs/tutorial/encoder.md

    ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ `jsonable_encoder` ๐Ÿ‘ˆ.
    
    โšซ๏ธ ๐Ÿ“จ ๐ŸŽš, ๐Ÿ’– Pydantic ๐Ÿท, & ๐Ÿ“จ ๐ŸŽป ๐Ÿ”— โฌ:
    
    //// tab | ๐Ÿ 3๏ธโƒฃ.6๏ธโƒฃ & ๐Ÿ”›
    
    ```Python hl_lines="5  22"
    {!> ../../docs_src/encoder/tutorial001.py!}
    ```
    
    ////
    
    //// tab | ๐Ÿ 3๏ธโƒฃ.1๏ธโƒฃ0๏ธโƒฃ & ๐Ÿ”›
    
    ```Python hl_lines="4  21"
    {!> ../../docs_src/encoder/tutorial001_py310.py!}
    ```
    
    ////
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  7. docs/em/docs/tutorial/body-nested-models.md

    โฎ๏ธ **FastAPI**, ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ”ฌ, โœ”, ๐Ÿ“„, & โš™๏ธ ๐ŸŽฒ ๐Ÿ™‡ ๐Ÿฆ ๐Ÿท (๐Ÿ‘ Pydantic).
    
    ## ๐Ÿ“‡ ๐Ÿ‘
    
    ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ”ฌ ๐Ÿ”ข ๐Ÿพ. ๐Ÿ–ผ, ๐Ÿ `list`:
    
    //// tab | ๐Ÿ 3๏ธโƒฃ.6๏ธโƒฃ & ๐Ÿ”›
    
    ```Python hl_lines="14"
    {!> ../../docs_src/body_nested_models/tutorial001.py!}
    ```
    
    ////
    
    //// tab | ๐Ÿ 3๏ธโƒฃ.1๏ธโƒฃ0๏ธโƒฃ & ๐Ÿ”›
    
    ```Python hl_lines="12"
    {!> ../../docs_src/body_nested_models/tutorial001_py310.py!}
    ```
    
    ////
    
    ๐Ÿ‘‰ ๐Ÿ”œ โš’ `tags` ๐Ÿ“‡, ๐Ÿ‘ โšซ๏ธ ๐Ÿšซ ๐Ÿ“ฃ ๐Ÿ†Ž ๐Ÿ”ฃ ๐Ÿ“‡.
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  8. docs/zh/docs/tutorial/handling-errors.md

    ```Python hl_lines="14"
    {!../../docs_src/handling_errors/tutorial002.py!}
    
    ```
    
    ## ๅฎ‰่ฃ…่‡ชๅฎšไน‰ๅผ‚ๅธธๅค„็†ๅ™จ
    
    ๆทปๅŠ ่‡ชๅฎšไน‰ๅค„็†ๅ™จ๏ผŒ่ฆไฝฟ็”จ [Starlette ็š„ๅผ‚ๅธธๅทฅๅ…ท](https://www.starlette.io/exceptions/)ใ€‚
    
    ๅ‡่ฎพ่ฆ่งฆๅ‘็š„่‡ชๅฎšไน‰ๅผ‚ๅธธๅซไฝœ `UnicornException`ใ€‚
    
    ไธ”้œ€่ฆ FastAPI ๅฎž็Žฐๅ…จๅฑ€ๅค„็†่ฏฅๅผ‚ๅธธใ€‚
    
    ๆญคๆ—ถ๏ผŒๅฏไปฅ็”จ `@app.exception_handler()` ๆทปๅŠ ่‡ชๅฎšไน‰ๅผ‚ๅธธๆŽงๅˆถๅ™จ๏ผš
    
    ```Python hl_lines="5-7  13-18  24"
    {!../../docs_src/handling_errors/tutorial003.py!}
    
    ```
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  9. docs/pt/docs/tutorial/schema-extra-example.md

    ```Python hl_lines="15-23"
    {!../../docs_src/schema_extra_example/tutorial001.py!}
    ```
    
    Essas informaรงรตes extras serรฃo adicionadas como se encontram no **JSON Schema** de resposta desse modelo e serรฃo usadas na documentaรงรฃo da API.
    
    /// tip | "Dica"
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  10. docs/ko/docs/tutorial/request-files.md

    ///
    
    ## `File` ์ž„ํฌํŠธ
    
    `fastapi` ์—์„œ `File` ๊ณผ `UploadFile` ์„ ์ž„ํฌํŠธ ํ•ฉ๋‹ˆ๋‹ค:
    
    ```Python hl_lines="1"
    {!../../docs_src/request_files/tutorial001.py!}
    ```
    
    ## `File` ๋งค๊ฐœ๋ณ€์ˆ˜ ์ •์˜
    
    `Body` ๋ฐ `Form` ๊ณผ ๋™์ผํ•œ ๋ฐฉ์‹์œผ๋กœ ํŒŒ์ผ์˜ ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค:
    
    ```Python hl_lines="7"
    {!../../docs_src/request_files/tutorial001.py!}
    ```
    
    /// info | "์ •๋ณด"
    
    `File` ์€ `Form` ์œผ๋กœ๋ถ€ํ„ฐ ์ง์ ‘ ์ƒ์†๋œ ํด๋ž˜์Šค์ž…๋‹ˆ๋‹ค.
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.1K bytes
    - Viewed (0)
Back to top