- Sort Score
- Result 10 results
- Languages All
Results 321 - 330 of 874 for tutorial001 (0.09 sec)
-
docs/pt/docs/advanced/response-directly.md
Para esses casos, você pode usar o `jsonable_encoder` para converter seus dados antes de repassá-los para a resposta: ```Python hl_lines="6-7 21-22" {!../../docs_src/response_directly/tutorial001.py!} ``` /// note | Detalhes Técnicos Você também pode utilizar `from starlette.responses import JSONResponse`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.3K bytes - Viewed (0) -
docs/de/docs/tutorial/path-params.md
```Python hl_lines="17" {!../../docs_src/path_params/tutorial005.py!} ``` #### *Enum-Wert* erhalten Den tatsächlichen Wert (in diesem Fall ein `str`) erhalten Sie via `model_name.value`, oder generell, `ihr_enum_member.value`: ```Python hl_lines="20" {!../../docs_src/path_params/tutorial005.py!} ``` /// tip | "Tipp"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.2K bytes - Viewed (0) -
tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py
import gzip import json import pytest from fastapi import Request from fastapi.testclient import TestClient from docs_src.custom_request_and_route.tutorial001 import app @app.get("/check-class") async def check_gzip_request(request: Request): return {"request_class": type(request).__name__} client = TestClient(app) @pytest.mark.parametrize("compress", [True, False]) def test_gzip_request(compress):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Nov 13 14:26:09 UTC 2022 - 886 bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.path_operation_advanced_configuration.tutorial001 import app client = TestClient(app) def test_get(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"item_id": "Foo"}] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1K bytes - Viewed (0) -
docs/em/docs/tutorial/encoder.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.5K bytes - Viewed (0) -
docs/de/docs/advanced/wsgi.md
Sie müssen `WSGIMiddleware` importieren. Wrappen Sie dann die WSGI-Anwendung (z. B. Flask) mit der Middleware. Und dann mounten Sie das auf einem Pfad. ```Python hl_lines="2-3 23" {!../../docs_src/wsgi/tutorial001.py!} ``` ## Es ansehen Jetzt wird jede Anfrage unter dem Pfad `/v1/` von der Flask-Anwendung verarbeitet. Und der Rest wird von **FastAPI** gehandhabt.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.2K bytes - Viewed (0) -
docs/pt/docs/advanced/wsgi.md
Você precisa importar o `WSGIMiddleware`. Em seguinda, encapsular a aplicação WSGI (e.g. Flask) com o middleware. E então **"montar"** em um caminho de rota. ```Python hl_lines="2-3 23" {!../../docs_src/wsgi/tutorial001.py!} ``` ## Conferindo Agora todas as requisições sob o caminho `/v1/` serão manipuladas pela aplicação utilizando Flask. E o resto será manipulado pelo **FastAPI**.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.2K bytes - Viewed (0) -
docs/ko/docs/tutorial/extra-data-types.md
``` //// //// tab | Python 3.8+ non-Annotated /// tip Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="1 2 12-16" {!> ../../docs_src/extra_data_types/tutorial001.py!} ``` //// 함수 안의 매개변수가 그들만의 데이터 자료형을 가지고 있으며, 예를 들어, 다음과 같이 날짜를 조작할 수 있음을 참고하십시오: //// tab | Python 3.10+ ```Python hl_lines="18-19"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.3K bytes - Viewed (0) -
tests/test_tutorial/test_templates/test_tutorial001.py
shutil.rmtree("./templates") shutil.copytree("./docs_src/templates/templates/", "./templates") shutil.copytree("./docs_src/templates/static/", "./static") from docs_src.templates.tutorial001 import app client = TestClient(app) response = client.get("/items/foo") assert response.status_code == 200, response.text assert (
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jan 11 22:25:37 UTC 2024 - 910 bytes - Viewed (0) -
docs/ko/docs/tutorial/query-params.md
```Python hl_lines="8 10" {!../../docs_src/query_params/tutorial004.py!} ``` ## 필수 쿼리 매개변수 경로가 아닌 매개변수에 대한 기본값을 선언할 때(지금은 쿼리 매개변수만 보았습니다), 해당 매개변수는 필수적(Required)이지 않았습니다. 특정값을 추가하지 않고 선택적으로 만들기 위해선 기본값을 `None`으로 설정하면 됩니다. 그러나 쿼리 매개변수를 필수로 만들려면 단순히 기본값을 선언하지 않으면 됩니다: ```Python hl_lines="6-7" {!../../docs_src/query_params/tutorial005.py!} ``` 여기 쿼리 매개변수 `needy`는 `str`형인 필수 쿼리 매개변수입니다.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.3K bytes - Viewed (0)