Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 72 for txt (0.18 sec)

  1. docs/ja/docs/deployment/docker.md

    COPY ./pyproject.toml ./poetry.lock* /tmp/
    
    # (5)
    RUN poetry export -f requirements.txt --output requirements.txt --without-hashes
    
    # (6)
    FROM python:3.9
    
    # (7)
    WORKDIR /code
    
    # (8)
    COPY --from=requirements-stage /tmp/requirements.txt /code/requirements.txt
    
    # (9)
    RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
    
    # (10)
    COPY ./app /code/app
    
    # (11)
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 44.3K bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/dependencies/dependencies-with-yield.md

    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    Im Hintergrund erstellt das `open("./somefile.txt")` ein Objekt, das als „Kontextmanager“ bezeichnet wird.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:10:29 GMT 2024
    - 13.5K bytes
    - Viewed (0)
  3. docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md

    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    その後の`open("./somefile.txt")`は「コンテキストマネージャ」と呼ばれるオブジェクトを作成します。
    
    `with`ブロックが終了すると、例外があったとしてもファイルを確かに閉じます。
    
    `yield`を依存関係を作成すると、**FastAPI** は内部的にそれをコンテキストマネージャに変換し、他の関連ツールと組み合わせます。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  4. docs/zh/docs/tutorial/background-tasks.md

    === "Python 3.8+ 没Annotated"
    
        !!! tip
             尽可能选择使用 `Annotated` 的版本。
    
        ```Python hl_lines="13  15  22  25"
        {!> ../../../docs_src/background_tasks/tutorial002.py!}
        ```
    
    该示例中,信息会在响应发出 *之后* 被写到 `log.txt` 文件。
    
    如果请求中有查询,它将在后台任务中写入日志。
    
    然后另一个在 *路径操作函数* 生成的后台任务会使用路径参数 `email` 写入一条信息。
    
    ## 技术细节
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5K bytes
    - Viewed (0)
  5. docs/ru/docs/tutorial/background-tasks.md

        ```Python hl_lines="13  15  22  25"
        {!> ../../../docs_src/background_tasks/tutorial002.py!}
        ```
    
    В этом примере сообщения будут записаны в `log.txt` *после* того, как ответ сервера был отправлен.
    
    Если бы в запрос был передан query-параметр `q`, он бы первыми записался в `log.txt` фоновой задачей (потому что вызывается в зависимости `get_query`).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 09 15:52:07 GMT 2024
    - 8K bytes
    - Viewed (0)
  6. docs/ja/docs/tutorial/path-params.md

      "message": "Deep Learning FTW!"
    }
    ```
    
    ## パスを含んだパスパラメータ
    
    パス `/files/{file_path}` となる *path operation* を持っているとしましょう。
    
    ただし、 `home/johndoe/myfile.txt` のような*パス*を含んだ `file_path` が必要です。
    
    したがって、URLは `/files/home/johndoe/myfile.txt` の様になります。
    
    ### OpenAPIサポート
    
    OpenAPIはテストや定義が困難なシナリオにつながる可能性があるため、内部に*パス*を含む*パスパラメータ*の宣言をサポートしていません。
    
    それにも関わらず、Starletteの内部ツールのひとつを使用することで、**FastAPI**はそれが実現できます。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  7. docs/em/docs/tutorial/path-params.md

      "message": "Deep Learning FTW!"
    }
    ```
    
    ## ➡ 🔢 ⚗ ➡
    
    ➡️ 💬 👆 ✔️ *➡ 🛠️* ⏮️ ➡ `/files/{file_path}`.
    
    ✋️ 👆 💪 `file_path` ⚫️ 🔌 *➡*, 💖 `home/johndoe/myfile.txt`.
    
    , 📛 👈 📁 🔜 🕳 💖: `/files/home/johndoe/myfile.txt`.
    
    ### 🗄 🐕‍🦺
    
    🗄 🚫 🐕‍🦺 🌌 📣 *➡ 🔢* 🔌 *➡* 🔘, 👈 💪 ↘️ 😐 👈 ⚠ 💯 & 🔬.
    
    👐, 👆 💪 ⚫️ **FastAPI**, ⚙️ 1️⃣ 🔗 🧰 ⚪️➡️ 💃.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/wsgi.md

    And the rest will be handled by **FastAPI**.
    
    If you run it and go to <a href="http://localhost:8000/v1/" class="external-link" target="_blank">http://localhost:8000/v1/</a> you will see the response from Flask:
    
    ```txt
    Hello, World from Flask!
    ```
    
    And if you go to <a href="http://localhost:8000/v2" class="external-link" target="_blank">http://localhost:8000/v2</a> you will see the response from FastAPI:
    
    ```JSON
    {
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  9. docs/zh/docs/deployment/deta.md

    def read_item(item_id: int):
        return {"item_id": item_id}
    ```
    
    ### 需求项
    
    在文件夹里新建包含如下内容的 `requirements.txt` 文件:
    
    ```text
    fastapi
    ```
    
    !!! tip "提示"
    
        在 Deta 上部署时无需安装 Uvicorn,虽然在本地测试应用时需要安装。
    
    ### 文件夹架构
    
    `./fastapideta/` 文件夹中现在有两个文件:
    
    ```
    .
    └── main.py
    └── requirements.txt
    ```
    
    ## 创建免费 Deta 账号
    
    Plain Text
    - Registered: Sun Mar 31 07:19:09 GMT 2024
    - Last Modified: Sun Jan 28 18:06:55 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  10. docs/em/docs/advanced/events.md

    👈 🗜 🔢 🔘 🕳 🤙 "**🔁 🔑 👨‍💼**".
    
    ```Python hl_lines="1  13"
    {!../../../docs_src/events/tutorial003.py!}
    ```
    
    **🔑 👨‍💼** 🐍 🕳 👈 👆 💪 ⚙️ `with` 📄, 🖼, `open()` 💪 ⚙️ 🔑 👨‍💼:
    
    ```Python
    with open("file.txt") as file:
        file.read()
    ```
    
    ⏮️ ⏬ 🐍, 📤 **🔁 🔑 👨‍💼**. 👆 🔜 ⚙️ ⚫️ ⏮️ `async with`:
    
    ```Python
    async with lifespan(app):
        await do_stuff()
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
Back to top