Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 149 for Main (0.17 sec)

  1. docs/de/docs/advanced/async-tests.md

    ```
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    │   └── test_main.py
    ```
    
    Die Datei `main.py` hätte als Inhalt:
    
    ```Python
    {!../../../docs_src/async_tests/main.py!}
    ```
    
    Die Datei `test_main.py` hätte die Tests für `main.py`, das könnte jetzt so aussehen:
    
    ```Python
    {!../../../docs_src/async_tests/test_main.py!}
    ```
    
    ## Es ausführen
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:25:57 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/bigger-applications.md

    ## The main `FastAPI`
    
    Now, let's see the module at `app/main.py`.
    
    Here's where you import and use the class `FastAPI`.
    
    This will be the main file in your application that ties everything together.
    
    And as most of your logic will now live in its own specific module, the main file will be quite simple.
    
    ### Import `FastAPI`
    
    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/ru/docs/tutorial/debugging.md

    В вашем FastAPI приложении, импортируйте и вызовите `uvicorn` напрямую:
    
    ```Python hl_lines="1  15"
    {!../../../docs_src/debugging/tutorial001.py!}
    ```
    
    ### Описание `__name__ == "__main__"`
    
    Главная цель использования `__name__ == "__main__"` в том, чтобы код выполнялся при запуске файла с помощью:
    
    <div class="termy">
    
    ```console
    $ python myapp.py
    ```
    
    </div>
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/sub-applications.md

    ```Python hl_lines="11  19"
    {!../../../docs_src/sub_applications/tutorial001.py!}
    ```
    
    ### Check the automatic API docs
    
    Now, run `uvicorn` with the main app, if your file is `main.py`, it would be:
    
    <div class="termy">
    
    ```console
    $ uvicorn main:app --reload
    
    <span style="color: green;">INFO</span>:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    ```
    
    </div>
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/bigger-applications.md

    因此,为了能够在同一个文件中使用它们,我们直接导入子模块:
    
    ```Python hl_lines="5" title="app/main.py"
    {!../../../docs_src/bigger_applications/app/main.py!}
    ```
    
    ### 包含 `users` 和 `items` 的 `APIRouter`
    
    现在,让我们来包含来自 `users` 和 `items` 子模块的 `router`。
    
    ```Python hl_lines="10-11" title="app/main.py"
    {!../../../docs_src/bigger_applications/app/main.py!}
    ```
    
    !!! info
    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)
  6. doc/next/6-stdlib/1-time.md

    Earlier versions of Go did not collect unstopped `Timer`s until after
    they had fired and never collected unstopped `Ticker`s.
    
    Second, the timer channel associated with a `Timer` or `Ticker` is
    now unbuffered, with capacity 0.
    The main effect of this change is that Go now guarantees
    that for any call to a `Reset` or `Stop` method, no stale values
    prepared before that call will be sent or received after the call.
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Apr 12 20:57:18 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  7. docs/ko/docs/deployment/docker.md

    # (1)
    COPY ./main.py /code/
    
    # (2)
    CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
    ```
    
    1. `main.py` 파일을 `/code` 디렉터리로 곧바로 복사합니다(`./app` 디렉터리는 고려하지 않습니다).
    
    2. Uvicorn을 실행해 `app` 객체를 (`app.main` 대신) `main`으로 부터 불러오도록 합니다.
    
    그 다음 Uvicorn 커맨드를 조정해서 FastAPI 객체를 불러오는데 `app.main` 대신에 새로운 모듈 `main`을 사용하도록 합니다.
    
    ## 배포 개념
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 42.6K bytes
    - Viewed (0)
  8. docs/de/docs/advanced/websockets.md

    {!../../../docs_src/websockets/tutorial001.py!}
    ```
    
    Sie können Binär-, Text- und JSON-Daten empfangen und senden.
    
    ## Es ausprobieren
    
    Wenn Ihre Datei `main.py` heißt, führen Sie Ihre Anwendung so aus:
    
    <div class="termy">
    
    ```console
    $ uvicorn main:app --reload
    
    <span style="color: green;">INFO</span>:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    ```
    
    </div>
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:17:58 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  9. docs/em/docs/tutorial/sql-databases.md

    ## 👑 **FastAPI** 📱
    
    &amp; 🔜 📁 `sql_app/main.py` ➡️ 🛠️ &amp; ⚙️ 🌐 🎏 🍕 👥 ✍ ⏭.
    
    ### ✍ 💽 🏓
    
    📶 🙃 🌌 ✍ 💽 🏓:
    
    === "🐍 3️⃣.6️⃣ &amp; 🔛"
    
        ```Python hl_lines="9"
        {!> ../../../docs_src/sql_databases/sql_app/main.py!}
        ```
    
    === "🐍 3️⃣.9️⃣ &amp; 🔛"
    
        ```Python hl_lines="7"
        {!> ../../../docs_src/sql_databases/sql_app_py39/main.py!}
        ```
    
    #### ⚗ 🗒
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 25.2K bytes
    - Viewed (1)
  10. docs/zh/docs/advanced/sub-applications.md

    在顶层应用 `app` 中,挂载子应用 `subapi`。
    
    本例的子应用挂载在 `/subapi` 路径下:
    
    ```Python hl_lines="11  19"
    {!../../../docs_src/sub_applications/tutorial001.py!}
    ```
    
    ### 查看文档
    
    如果主文件是 `main.py`,则用以下 `uvicorn` 命令运行主应用:
    
    <div class="termy">
    
    ```console
    $ uvicorn main:app --reload
    
    <span style="color: green;">INFO</span>:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    ```
    
    </div>
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 2.5K bytes
    - Viewed (0)
Back to top