- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 106 for Main (0.14 sec)
-
docs/en/docs/tutorial/testing.md
. ├── app │ ├── __init__.py │ ├── main.py │ └── test_main.py ``` Because this file is in the same package, you can use relative imports to import the object `app` from the `main` module (`main.py`): ```Python hl_lines="3" {!../../../docs_src/app_testing/test_main.py!} ``` ...and have the code for the tests just like before. ## Testing: extended example
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) -
docs/en/docs/deployment/manually.md
</div> !!! note The command `uvicorn main:app` refers to: * `main`: the file `main.py` (the Python "module"). * `app`: the object created inside of `main.py` with the line `app = FastAPI()`. It is equivalent to: ```Python from main import app ``` !!! warning Uvicorn and others support a `--reload` option that is useful during development.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 9.2K bytes - Viewed (0) -
docs/ko/docs/tutorial/debugging.md
## `uvicorn` 호출 FastAPI 애플리케이션에서 `uvicorn`을 직접 임포트하여 실행합니다 ```Python hl_lines="1 15" {!../../../docs_src/debugging/tutorial001.py!} ``` ### `__name__ == "__main__"` 에 대하여 `__name__ == "__main__"`의 주요 목적은 다음과 같이 파일이 호출될 때 실행되는 일부 코드를 갖는 것입니다. <div class="termy"> ```console $ python myapp.py ``` </div> 그러나 다음과 같이 다른 파일을 가져올 때는 호출되지 않습니다. ```Python
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 04:18:08 GMT 2024 - 2.8K 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/em/docs/tutorial/first-steps.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 8.1K bytes - Viewed (0) -
docs/uk/docs/tutorial/index.md
Усі блоки коду можна скопіювати та використовувати безпосередньо (це фактично перевірені файли Python). Щоб запустити будь-який із прикладів, скопіюйте код у файл `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)
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Sep 02 15:29:36 GMT 2023 - 4.4K bytes - Viewed (0) -
docs/pt/docs/tutorial/index.md
Todos os blocos de código podem ser copiados e utilizados diretamente (eles são, na verdade, arquivos Python testados). Para rodar qualquer um dos exemplos, copie o codigo para um arquivo `main.py`, e inicie o `uvivorn` com: <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: Thu Apr 18 19:53:19 GMT 2024 - 2.8K bytes - Viewed (0) -
docs/ko/docs/tutorial/index.md
또한 향후에도 참조 자료로 쓰일 수 있도록 작성되었습니다. 그러므로 필요할 때에 다시 돌아와서 원하는 것을 정확히 찾을 수 있습니다. ## 코드 실행하기 모든 코드 블록은 복사하여 바로 사용할 수 있습니다(실제로 테스트된 파이썬 파일입니다). 예제를 실행하려면 코드를 `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)
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Feb 02 17:39:46 GMT 2024 - 3K bytes - Viewed (0) -
docs/fr/docs/deployment/docker.md
```Dockerfile FROM python:3.7 RUN pip install fastapi uvicorn EXPOSE 80 COPY ./app /app CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"] ``` ## Créer le code **FastAPI**. * Créer un répertoire `app` et y entrer. * Créez un fichier `main.py` avec : ```Python from typing import Optional from fastapi import FastAPI app = FastAPI() @app.get("/")
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 12 00:06:16 GMT 2022 - 7.5K bytes - Viewed (0) -
docs/en/docs/advanced/security/index.md
!!! tip The next sections are **not necessarily "advanced"**. And it's possible that for your use case, the solution is in one of them. ## Read the Tutorial first The next sections assume you already read the main [Tutorial - User Guide: Security](../../tutorial/security/index.md){.internal-link target=_blank}.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Mar 31 23:52:53 GMT 2024 - 633 bytes - Viewed (0)