- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 361 for Main (0.13 sec)
-
docs/zh/docs/deployment/docker.md
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt # (1) COPY ./main.py /code/ # (2) CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"] ``` 1. 直接将`main.py`文件复制到`/code`目录中(不包含任何`./app`目录)。 2. 运行 Uvicorn 并告诉它从 `main` 导入 `app` 对象(而不是从 `app.main` 导入)。 然后调整Uvicorn命令使用新模块`main`而不是`app.main`来导入FastAPI 实例`app`。 ## 部署概念
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 31.2K bytes - Viewed (0) -
docs/em/docs/tutorial/testing.md
``` . ├── app │ ├── __init__.py │ └── main.py ``` 📁 `main.py` 👆 ✔️ 👆 **FastAPI** 📱: ```Python {!../../../docs_src/app_testing/main.py!} ``` ### 🔬 📁 ⤴️ 👆 💪 ✔️ 📁 `test_main.py` ⏮️ 👆 💯. ⚫️ 💪 🖖 🔛 🎏 🐍 📦 (🎏 📁 ⏮️ `__init__.py` 📁): ``` hl_lines="5" . ├── app │ ├── __init__.py │ ├── main.py │ └── test_main.py ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 5.2K bytes - Viewed (0) -
maven-core/src/site/apt/default-bindings.apt.vm
%{snippet|id=jar|file=${project.basedir}/src/main/java/org/apache/maven/lifecycle/providers/packaging/JarLifecycleMappingProvider.java} * Plugin bindings for <<<ejb>>> packaging %{snippet|id=ejb|file=${project.basedir}/src/main/java/org/apache/maven/lifecycle/providers/packaging/EjbLifecycleMappingProvider.java} * Plugin bindings for <<<maven-plugin>>> packaging
Plain Text - Registered: Sun Apr 28 03:35:10 GMT 2024 - Last Modified: Wed Mar 08 17:45:23 GMT 2023 - 2.7K bytes - Viewed (0) -
docs/ru/docs/tutorial/first-steps.md
<span style="color: green;">INFO</span>: Application startup complete. ``` </div> !!! note "Технические детали" Команда `uvicorn main:app` обращается к: * `main`: файл `main.py` (модуль Python). * `app`: объект, созданный внутри файла `main.py` в строке `app = FastAPI()`. * `--reload`: перезапускает сервер после изменения кода. Используйте только для разработки. В окне вывода появится следующая строка:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 13.1K bytes - Viewed (0) -
docs/en/docs/tutorial/debugging.md
## Call `uvicorn` In your FastAPI application, import and run `uvicorn` directly: ```Python hl_lines="1 15" {!../../../docs_src/debugging/tutorial001.py!} ``` ### About `__name__ == "__main__"` The main purpose of the `__name__ == "__main__"` is to have some code that is executed when your file is called with: <div class="termy"> ```console $ python myapp.py ``` </div>
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jun 22 17:04:16 GMT 2023 - 2.4K bytes - Viewed (0) -
docs/ja/docs/tutorial/testing.md
また、**FastAPI** アプリケーションは、複数のファイル/モジュールなどで構成されている場合もあります。 ### **FastAPI** アプリファイル **FastAPI** アプリに `main.py` ファイルがあるとします: ```Python {!../../../docs_src/app_testing/main.py!} ``` ### テストファイル 次に、テストを含む `test_main.py` ファイルを作成し、`main` モジュール (`main.py`) から `app` をインポートします: ```Python {!../../../docs_src/app_testing/test_main.py!} ``` ## テスト: 例の拡張 次に、この例を拡張し、詳細を追加して、さまざまなパーツをテストする方法を確認しましょう。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 16:16:02 GMT 2023 - 5.8K bytes - Viewed (0) -
docs/de/docs/tutorial/first-steps.md
<span style="color: green;">INFO</span>: Application startup complete. ``` </div> !!! note "Hinweis" Der Befehl `uvicorn main:app` bezieht sich auf: * `main`: die Datei `main.py` (das sogenannte Python-„Modul“). * `app`: das Objekt, welches in der Datei `main.py` mit der Zeile `app = FastAPI()` erzeugt wurde. * `--reload`: lässt den Server nach Codeänderungen neu starten. Verwenden Sie das nur während der Entwicklung.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jan 13 12:16:22 GMT 2024 - 10.5K bytes - Viewed (0) -
docs/en/docs/advanced/testing-database.md
Because now we are going to use a new database in a new file, we need to make sure we create the database with: ```Python Base.metadata.create_all(bind=engine) ``` That is normally called in `main.py`, but the line in `main.py` uses the database file `sql_app.db`, and we need to make sure we create `test.db` for the tests. So we add that line here, with the new file. ```Python hl_lines="16"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 3.5K bytes - Viewed (0) -
docs/pl/docs/tutorial/index.md
## Wykonywanie kodu Wszystkie fragmenty kodu mogą być skopiowane bezpośrednio i użyte (są poprawnymi i przetestowanymi plikami). Żeby wykonać każdy przykład skopiuj kod to pliku `main.py` i uruchom `uvicorn` za pomocą: <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)
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jun 24 14:47:15 GMT 2023 - 2.8K bytes - Viewed (0) -
docs/en/docs/advanced/websockets.md
```Python hl_lines="48-52" {!../../../docs_src/websockets/tutorial001.py!} ``` You can receive and send binary, text, and JSON data. ## Try it If your file is named `main.py`, run your application with: <div class="termy"> ```console $ fastapi dev main.py <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 May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 6.2K bytes - Viewed (0)