Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 139 for Liles (0.18 sec)

  1. docs/en/docs/tutorial/static-files.md

    # Static Files
    
    You can serve static files automatically from a directory using `StaticFiles`.
    
    ## Use `StaticFiles`
    
    * Import `StaticFiles`.
    * "Mount" a `StaticFiles()` instance in a specific path.
    
    ```Python hl_lines="2  6"
    {!../../../docs_src/static_files/tutorial001.py!}
    ```
    
    !!! note "Technical Details"
        You could also use `from starlette.staticfiles import StaticFiles`.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 19:56:09 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  2. docs/em/docs/tutorial/request-files.md

        {!> ../../../docs_src/request_files/tutorial001_02.py!}
        ```
    
    === "🐍 3️⃣.1️⃣0️⃣ & 🔛"
    
        ```Python hl_lines="7  14"
        {!> ../../../docs_src/request_files/tutorial001_02_py310.py!}
        ```
    
    ## `UploadFile` ⏮️ 🌖 🗃
    
    👆 💪 ⚙️ `File()` ⏮️ `UploadFile`, 🖼, ⚒ 🌖 🗃:
    
    ```Python hl_lines="13"
    {!../../../docs_src/request_files/tutorial001_03.py!}
    ```
    
    ## 💗 📁 📂
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  3. 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` 으로부터 직접 상속된 클래스입니다.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  4. docs/ru/docs/tutorial/request-forms-and-files.md

    ## Импортируйте `File` и `Form`
    
    === "Python 3.9+"
    
        ```Python hl_lines="3"
        {!> ../../../docs_src/request_forms_and_files/tutorial001_an_py39.py!}
        ```
    
    === "Python 3.6+"
    
        ```Python hl_lines="1"
        {!> ../../../docs_src/request_forms_and_files/tutorial001_an.py!}
        ```
    
    === "Python 3.6+ без Annotated"
    
        !!! tip "Подсказка"
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_request_files/test_tutorial001_03.py

    from fastapi.testclient import TestClient
    
    from docs_src.request_files.tutorial001_03 import app
    
    client = TestClient(app)
    
    
    def test_post_file(tmp_path):
        path = tmp_path / "test.txt"
        path.write_bytes(b"<file content>")
    
        client = TestClient(app)
        with path.open("rb") as file:
            response = client.post("/files/", files={"file": file})
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 6K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/path-params.md

    }
    ```
    
    ## Path parameters containing paths
    
    Let's say you have a *path operation* with a path `/files/{file_path}`.
    
    But you need `file_path` itself to contain a *path*, like `home/johndoe/myfile.txt`.
    
    So, the URL for that file would be something like: `/files/home/johndoe/myfile.txt`.
    
    ### OpenAPI support
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  7. docs/ru/docs/tutorial/path-params.md

      "message": "Deep Learning FTW!"
    }
    ```
    
    ## Path-параметры, содержащие пути
    
    Предположим, что есть *операция пути* с путем `/files/{file_path}`.
    
    Но вам нужно, чтобы `file_path` сам содержал *путь*, например, `home/johndoe/myfile.txt`.
    
    Тогда URL для этого файла будет такой: `/files/home/johndoe/myfile.txt`.
    
    ### Поддержка OpenAPI
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  8. docs/zh/docs/tutorial/path-params.md

    直接使用 Starlette 的选项声明包含*路径*的*路径参数*:
    
    ```
    /files/{file_path:path}
    ```
    
    本例中,参数名为 `file_path`,结尾部分的 `:path` 说明该参数应匹配*路径*。
    
    用法如下:
    
    ```Python hl_lines="6"
    {!../../../docs_src/path_params/tutorial004.py!}
    ```
    
    !!! tip "提示"
    
        注意,包含 `/home/johndoe/myfile.txt` 的路径参数要以斜杠(`/`)开头。
    
        本例中的 URL 是 `/files//home/johndoe/myfile.txt`。注意,`files` 和 `home` 之间要使用**双斜杠**(`//`)。
    
    ## 小结
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon Apr 01 05:35:40 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  9. docs/en/docs/contributing.md

    In fact, those blocks of code are not written inside the Markdown, they are Python files in the `./docs_src/` directory.
    
    And those Python files are included/injected in the documentation when generating the site.
    
    ### Docs for tests
    
    Most of the tests actually run against the example source files in the documentation.
    
    This helps to make sure that:
    
    * The documentation is up-to-date.
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 17:42:43 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  10. docs/fr/docs/tutorial/path-params.md

    }
    ```
    
    ## Paramètres de chemin contenant des chemins
    
    Disons que vous avez une *fonction de chemin* liée au chemin `/files/{file_path}`.
    
    Mais que `file_path` lui-même doit contenir un *chemin*, comme `home/johndoe/myfile.txt` par exemple.
    
    Donc, l'URL pour ce fichier pourrait être : `/files/home/johndoe/myfile.txt`.
    
    ### Support d'OpenAPI
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10K bytes
    - Viewed (0)
Back to top