- Sort Score
- Result 10 results
- Languages All
Results 1451 - 1460 of 2,000 for Fastapi (0.12 sec)
-
tests/test_tutorial/test_security/test_tutorial003.py
from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.security.tutorial003 import app client = TestClient(app) def test_login(): response = client.post("/token", data={"username": "johndoe", "password": "secret"}) assert response.status_code == 200, response.text assert response.json() == {"access_token": "johndoe", "token_type": "bearer"} def test_login_incorrect_password():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8K bytes - Viewed (0) -
docs/de/docs/tutorial/dependencies/sub-dependencies.md
# Unterabhängigkeiten Sie können Abhängigkeiten erstellen, die **Unterabhängigkeiten** haben. Diese können so **tief** verschachtelt sein, wie nötig. **FastAPI** kümmert sich darum, sie aufzulösen. ## Erste Abhängigkeit, „Dependable“ Sie könnten eine erste Abhängigkeit („Dependable“) wie folgt erstellen: //// tab | Python 3.10+ ```Python hl_lines="8-9" {!> ../../docs_src/dependencies/tutorial005_an_py310.py!} ``` ////
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.2K bytes - Viewed (0) -
docs/zh/docs/async.md
但与此同时,必须"等待"通过 `async def` 定义的函数。因此,带 `async def` 的函数也只能在 `async def` 定义的函数内部调用。 那么,这关于先有鸡还是先有蛋的问题,如何调用第一个 `async` 函数? 如果您使用 **FastAPI**,你不必担心这一点,因为"第一个"函数将是你的路径操作函数,FastAPI 将知道如何做正确的事情。 但如果您想在没有 FastAPI 的情况下使用 `async` / `await`,则可以这样做。 ### 编写自己的异步代码
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 21.1K bytes - Viewed (0) -
docs/em/docs/tutorial/path-operation-configuration.md
{!> ../../docs_src/path_operation_configuration/tutorial001_py310.py!} ``` //// 👈 👔 📟 🔜 ⚙️ 📨 & 🔜 🚮 🗄 🔗. /// note | "📡 ℹ" 👆 💪 ⚙️ `from starlette import status`. **FastAPI** 🚚 🎏 `starlette.status` `fastapi.status` 🏪 👆, 👩💻. ✋️ ⚫️ 👟 🔗 ⚪️➡️ 💃. /// ## 🔖 👆 💪 🚮 🔖 👆 *➡ 🛠️*, 🚶♀️ 🔢 `tags` ⏮️ `list` `str` (🛎 1️⃣ `str`): //// tab | 🐍 3️⃣.6️⃣ & 🔛
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.2K bytes - Viewed (0) -
tests/test_tutorial/test_query_params/test_tutorial005.py
from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.query_params.tutorial005 import app client = TestClient(app) def test_foo_needy_very(): response = client.get("/items/foo?needy=very") assert response.status_code == 200 assert response.json() == {"item_id": "foo", "needy": "very"} def test_foo_no_needy(): response = client.get("/items/foo")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 4K bytes - Viewed (0) -
docs/en/docs/advanced/testing-dependencies.md
### Use the `app.dependency_overrides` attribute For these cases, your **FastAPI** application has an attribute `app.dependency_overrides`, it is a simple `dict`. To override a dependency for testing, you put as a key the original dependency (a function), and as the value, your dependency override (another function). And then **FastAPI** will call that override instead of the original dependency. //// tab | Python 3.10+
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.9K bytes - Viewed (0) -
docs/zh-hant/docs/about/index.md
# 關於 FastAPI
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 15 09:57:21 UTC 2024 - 83 bytes - Viewed (0) -
docs/pt/docs/tutorial/bigger-applications.md
/// ## O principal `FastAPI` Agora, vamos ver o módulo em `app/main.py`. Aqui é onde você importa e usa a classe `FastAPI`. Este será o arquivo principal em seu aplicativo que une tudo. E como a maior parte de sua lógica agora viverá em seu próprio módulo específico, o arquivo principal será bem simples. ### Importar `FastAPI` Você importa e cria uma classe `FastAPI` normalmente.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 19.6K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial001.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.dependencies.tutorial001 import app client = TestClient(app) @pytest.mark.parametrize( "path,expected_status,expected_response", [ ("/items", 200, {"q": None, "skip": 0, "limit": 100}), ("/items?q=foo", 200, {"q": "foo", "skip": 0, "limit": 100}),
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 7K bytes - Viewed (0) -
tests/test_tutorial/test_extra_data_types/test_tutorial001_an_py39.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.extra_data_types.tutorial001_an_py39 import app client = TestClient(app) return client @needs_py39 def test_extra_types(client: TestClient): item_id = "ff97dd87-a4a5-4a12-b412-cde99f33e00e" data = {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Apr 19 00:11:40 UTC 2024 - 7K bytes - Viewed (0)