- Sort Score
- Result 10 results
- Languages All
Results 791 - 800 of 890 for docs_src (0.08 sec)
-
tests/test_tutorial/test_response_model/test_tutorial003.py
from dirty_equals import IsDict, IsOneOf from fastapi.testclient import TestClient from docs_src.response_model.tutorial003 import app client = TestClient(app) def test_post_user(): response = client.post( "/user/", json={ "username": "foo", "password": "fighter", "email": "******@****.***", "full_name": "Grave Dohl", }, )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 04 20:47:07 UTC 2023 - 5.6K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial004_py39.py
import pytest from dirty_equals import IsDict, IsOneOf from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.response_model.tutorial004_py39 import app client = TestClient(app) return client @needs_py39 @pytest.mark.parametrize( "url,data", [ ("/items/foo", {"name": "Foo", "price": 50.2}), (
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 04 20:47:07 UTC 2023 - 5.2K bytes - Viewed (0) -
tests/test_tutorial/test_extra_models/test_tutorial003.py
from dirty_equals import IsOneOf from fastapi.testclient import TestClient from docs_src.extra_models.tutorial003 import app client = TestClient(app) def test_get_car(): response = client.get("/items/item1") assert response.status_code == 200, response.text assert response.json() == { "description": "All my friends drive a low rider", "type": "car", } def test_get_plane():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 04 20:47:07 UTC 2023 - 5.1K bytes - Viewed (0) -
docs/em/docs/tutorial/cors.md
๐ ๐ช โ ๐ฅ ๐ ๐ฉโ๐ป โ: * ๐ (โ ๐, ๐ช, โ๏ธ). * ๐ฏ ๐บ๐ธ๐ ๐ฉโ๐ฌ (`POST`, `PUT`) โ๏ธ ๐ ๐ซ โฎ๏ธ ๐ `"*"`. * ๐ฏ ๐บ๐ธ๐ ๐ โ๏ธ ๐ ๐ซ โฎ๏ธ ๐ `"*"`. ```Python hl_lines="2 6-11 13-19" {!../../docs_src/cors/tutorial001.py!} ``` ๐ข ๐ข โ๏ธ `CORSMiddleware` ๐ ๏ธ ๐ซ ๐ข, ๐ ๐ ๐ช ๐ฏ ๐ ๏ธ ๐ฏ ๐จ๐ณ, ๐ฉโ๐ฌ, โ๏ธ ๐, โ ๐ฅ โ โ๏ธ ๐ซ โ๏ธ-๐ ๐. ๐ โ ๐โ๐ฆบ:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.1K bytes - Viewed (0) -
docs/ko/docs/tutorial/static-files.md
# ์ ์ ํ์ผ 'StaticFiles'๋ฅผ ์ฌ์ฉํ์ฌ ๋๋ ํ ๋ฆฌ์์ ์ ์ ํ์ผ์ ์๋์ผ๋ก ์ ๊ณตํ ์ ์์ต๋๋ค. ## `StaticFiles` ์ฌ์ฉ * `StaticFiles` ์ํฌํธํฉ๋๋ค. * ํน์ ๊ฒฝ๋ก์ `StaticFiles()` ์ธ์คํด์ค๋ฅผ "๋ง์ดํธ" ํฉ๋๋ค. ```Python hl_lines="2 6" {!../../docs_src/static_files/tutorial001.py!} ``` /// note | "๊ธฐ์ ์ ์ธ๋ถ์ฌํญ" `from starlette.staticfiles import StaticFiles` ๋ฅผ ์ฌ์ฉํ ์๋ ์์ต๋๋ค.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2K bytes - Viewed (0) -
docs/pt/docs/how-to/conditional-openapi.md
Vocรช pode usar facilmente as mesmas configuraรงรตes do Pydantic para configurar sua OpenAPI gerada e as interfaces de usuรกrio de documentos. Por exemplo: ```Python hl_lines="6 11" {!../../docs_src/conditional_openapi/tutorial001.py!} ``` Aqui declaramos a configuraรงรฃo `openapi_url` com o mesmo padrรฃo de `"/openapi.json"`. E entรฃo o usamos ao criar o aplicativo `FastAPI`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.6K bytes - Viewed (0) -
docs/en/docs/tutorial/debugging.md
You can connect the debugger in your editor, for example with Visual Studio Code or PyCharm. ## 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">
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.4K bytes - Viewed (0) -
tests/test_tutorial/test_request_form_models/test_tutorial002.py
import pytest from fastapi.testclient import TestClient from tests.utils import needs_pydanticv2 @pytest.fixture(name="client") def get_client(): from docs_src.request_form_models.tutorial002 import app client = TestClient(app) return client @needs_pydanticv2 def test_post_body_form(client: TestClient): response = client.post("/login/", data={"username": "Foo", "password": "secret"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 06 17:31:18 UTC 2024 - 6.2K bytes - Viewed (0) -
tests/test_tutorial/test_query_params/test_tutorial006_py310.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture(name="client") def get_client(): from docs_src.query_params.tutorial006_py310 import app c = TestClient(app) return c @needs_py310 def test_foo_needy_very(client: TestClient): response = client.get("/items/foo?needy=very") assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 6.2K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial010.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient @pytest.fixture(name="client") def get_client(): from docs_src.query_params_str_validations.tutorial010 import app client = TestClient(app) return client def test_query_params_str_validations_no_query(client: TestClient): response = client.get("/items/") assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 6.2K bytes - Viewed (0)