Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 230 for init (0.17 sec)

  1. docs/de/docs/reference/responses.md

                - render
                - init_headers
                - headers
                - set_cookie
                - delete_cookie
    
    ::: fastapi.responses.ORJSONResponse
        options:
            members:
                - charset
                - status_code
                - media_type
                - body
                - background
                - raw_headers
                - render
                - init_headers
                - headers
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Feb 19 15:53:39 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/bigger-applications.md

    Let's say you have a file structure like this:
    
    ```
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    │   ├── dependencies.py
    │   └── routers
    │   │   ├── __init__.py
    │   │   ├── items.py
    │   │   └── users.py
    │   └── internal
    │       ├── __init__.py
    │       └── admin.py
    ```
    
    !!! tip
        There are several `__init__.py` files: one in each directory or subdirectory.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  3. docs/zh/docs/advanced/testing-database.md

    本例中,要创建仅用于测试的临时数据库。
    
    ## 文件架构
    
    创建新文件 `sql_app/tests/test_sql_app.py`。
    
    因此,新的文件架构如下:
    
    ``` hl_lines="9-11"
    .
    └── sql_app
        ├── __init__.py
        ├── crud.py
        ├── database.py
        ├── main.py
        ├── models.py
        ├── schemas.py
        └── tests
            ├── __init__.py
            └── test_sql_app.py
    ```
    
    ## 创建新的数据库会话
    
    首先,为新建数据库创建新的数据库会话。
    
    测试时,使用 `test.db` 替代 `sql_app.db`。
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jan 28 18:09:26 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  4. docs/zh/docs/tutorial/bigger-applications.md

    ## 一个文件结构示例
    
    假设你的文件结构如下:
    
    ```
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    │   ├── dependencies.py
    │   └── routers
    │   │   ├── __init__.py
    │   │   ├── items.py
    │   │   └── users.py
    │   └── internal
    │       ├── __init__.py
    │       └── admin.py
    ```
    
    !!! tip
        上面有几个 `__init__.py` 文件:每个目录或子目录中都有一个。
    
        这就是能将代码从一个文件导入到另一个文件的原因。
    
        例如,在 `app/main.py` 中,你可以有如下一行:
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  5. docs/en/docs/how-to/custom-docs-ui-assets.md

    ### Project file structure
    
    Let's say your project file structure looks like this:
    
    ```
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    ```
    
    Now create a directory to store those static files.
    
    Your new file structure could look like this:
    
    ```
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    └── static/
    ```
    
    ### Download the files
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Oct 30 09:58:58 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  6. docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md

        {!> ../../../docs_src/dependencies/tutorial001.py!}
        ```
    
    这些参数就是 **FastAPI** 用来 "处理" 依赖项的。
    
    在两个例子下,都有:
    
    * 一个可选的 `q` 查询参数,是 `str` 类型。
    * 一个 `skip` 查询参数,是 `int` 类型,默认值为 `0`。
    * 一个 `limit` 查询参数,是 `int` 类型,默认值为 `100`。
    
    在两个例子下,数据都将被转换、验证、在 OpenAPI schema 上文档化,等等。
    
    ## 使用它
    
    现在,您可以使用这个类来声明你的依赖项了。
    
    === "Python 3.10+"
    
        ```Python hl_lines="17"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  7. docs/em/docs/advanced/testing-database.md

    ## 📁 📊
    
    👥 ✍ 🆕 📁 `sql_app/tests/test_sql_app.py`.
    
    🆕 📁 📊 👀 💖:
    
    ``` hl_lines="9-11"
    .
    └── sql_app
        ├── __init__.py
        ├── crud.py
        ├── database.py
        ├── main.py
        ├── models.py
        ├── schemas.py
        └── tests
            ├── __init__.py
            └── test_sql_app.py
    ```
    
    ## ✍ 🆕 💽 🎉
    
    🥇, 👥 ✍ 🆕 💽 🎉 ⏮️ 🆕 💽.
    
    💯 👥 🔜 ⚙️ 📁 `test.db` ↩️ `sql_app.db`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  8. docs/em/docs/tutorial/dependencies/classes-as-dependencies.md

        {!> ../../../docs_src/dependencies/tutorial001_py310.py!}
        ```
    
    📚 🔢 ⚫️❔ **FastAPI** 🔜 ⚙️ "❎" 🔗.
    
    👯‍♂️ 💼, ⚫️ 🔜 ✔️:
    
    * 📦 `q` 🔢 🔢 👈 `str`.
    *  `skip` 🔢 🔢 👈 `int`, ⏮️ 🔢 `0`.
    *  `limit` 🔢 🔢 👈 `int`, ⏮️ 🔢 `100`.
    
    👯‍♂️ 💼 💽 🔜 🗜, ✔, 📄 🔛 🗄 🔗, ♒️.
    
    ## ⚙️ ⚫️
    
    🔜 👆 💪 📣 👆 🔗 ⚙️ 👉 🎓.
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="19"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 6K bytes
    - Viewed (0)
  9. docs/de/docs/how-to/custom-docs-ui-assets.md

    Nehmen wir an, die Dateistruktur Ihres Projekts sieht folgendermaßen aus:
    
    ```
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    ```
    
    Erstellen Sie jetzt ein Verzeichnis zum Speichern dieser statischen Dateien.
    
    Ihre neue Dateistruktur könnte so aussehen:
    
    ```
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    └── static/
    ```
    
    ### Die Dateien herunterladen
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 18:17:36 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  10. docs/zh/docs/advanced/extending-openapi.md

    这种做法很常用,例如,在没有联网或本地局域网时也能让应用在离线状态下正常运行。
    
    本文介绍如何为 FastAPI 应用提供文件自托管服务,并设置文档使用这些文件。
    
    ### 项目文件架构
    
    假设项目文件架构如下:
    
    ```
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    ```
    
    接下来,创建存储静态文件的文件夹。
    
    新的文件架构如下:
    
    ```
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    └── static/
    ```
    
    ### 下载文件
    
    下载文档所需的静态文件,把文件放到 `static/` 文件夹里。
    
    右键点击链接,选择**另存为...**。
    
    Plain Text
    - Registered: Sun Mar 31 07:19:09 GMT 2024
    - Last Modified: Sat Mar 30 22:46:12 GMT 2024
    - 7.7K bytes
    - Viewed (0)
Back to top