- Sort Score
- Result 10 results
- Languages All
Results 1711 - 1720 of 1,916 for FastApi (0.04 sec)
-
docs/zh/docs/tutorial/security/get-current-user.md
{* ../../docs_src/security/tutorial002.py hl[31] *} 注意,此处把 `current_user` 的类型声明为 Pydantic 的 `User` 模型。 这有助于在函数内部使用代码补全和类型检查。 /// tip | 提示 还记得请求体也是使用 Pydantic 模型声明的吧。 放心,因为使用了 `Depends`,**FastAPI** 不会搞混。 /// /// check | 检查 依赖系统的这种设计方式可以支持不同的依赖项返回同一个 `User` 模型。 而不是局限于只能有一个返回该类型数据的依赖项。 /// ## 其它模型 接下来,直接在*路径操作函数*中获取当前用户,并用 `Depends` 在**依赖注入**系统中处理安全机制。Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 3.4K bytes - Viewed (0) -
docs/ru/docs/tutorial/query-params.md
{* ../../docs_src/query_params/tutorial002_py310.py hl[7] *} В этом случае, параметр `q` будет не обязательным и будет иметь значение `None` по умолчанию. /// check | Важно Также обратите внимание, что **FastAPI** достаточно умён чтобы заметить, что параметр `item_id` является path-параметром, а `q` нет, поэтому, это параметр запроса. /// ## Преобразование типа параметра запроса { #query-parameter-type-conversion }Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 7.8K bytes - Viewed (0) -
docs/pt/docs/how-to/separate-openapi-schemas.md
Nesse caso, você pode desativar esse recurso no **FastAPI**, com o parâmetro `separate_input_output_schemas=False`. /// info | Informação O suporte para `separate_input_output_schemas` foi adicionado no FastAPI `0.102.0`. 🤓 /// {* ../../docs_src/separate_openapi_schemas/tutorial002_py310.py hl[10] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Nov 12 16:23:57 UTC 2025 - 4.8K bytes - Viewed (0) -
docs/pt/docs/tutorial/security/oauth2-jwt.md
Assim, você poderia, por exemplo, compartilhar os mesmos dados de um aplicativo Django em um banco de dados com um aplicativo FastAPI. Ou migrar gradualmente uma aplicação Django usando o mesmo banco de dados. E seus usuários poderiam fazer login tanto pela sua aplicação Django quanto pela sua aplicação **FastAPI**, ao mesmo tempo. /// ## Criar o hash e verificar as senhas { #hash-and-verify-the-passwords }Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Nov 12 16:23:57 UTC 2025 - 11.4K bytes - Viewed (0) -
scripts/playwright/cookie_param_models/image01.py
page.screenshot(path="docs/en/docs/img/tutorial/cookie-param-models/image01.png") # --------------------- context.close() browser.close() process = subprocess.Popen( ["fastapi", "run", "docs_src/cookie_param_models/tutorial001.py"] ) try: for _ in range(3): try: response = httpx.get("http://localhost:8000/docs") except httpx.ConnectError:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 1.2K bytes - Viewed (0) -
docs/zh/docs/tutorial/cookie-params.md
第一个值是默认值,还可以传递所有验证参数或注释参数: {* ../../docs_src/cookie_params/tutorial001_an_py310.py hl[9] *} /// note | 技术细节 `Cookie` 、`Path` 、`Query` 是**兄弟类**,都继承自共用的 `Param` 类。 注意,从 `fastapi` 导入的 `Query`、`Path`、`Cookie` 等对象,实际上是返回特殊类的函数。 /// /// info | 说明 必须使用 `Cookie` 声明 cookie 参数,否则该参数会被解释为查询参数。 /// ## 小结Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 888 bytes - Viewed (0) -
tests/test_tutorial/test_configure_swagger_ui/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.configure_swagger_ui.tutorial001_py39 import app client = TestClient(app) def test_swagger_ui(): response = client.get("/docs") assert response.status_code == 200, response.text assert '"syntaxHighlight": false' in response.text, ( "syntaxHighlight should be included and converted to JSON" ) assert '"dom_id": "#swagger-ui"' in response.text, (
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.4K bytes - Viewed (0) -
tests/test_tutorial/test_metadata/test_tutorial001_1.py
from fastapi.testclient import TestClient from docs_src.metadata.tutorial001_1_py39 import app client = TestClient(app) def test_items(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"name": "Katana"}] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.7K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial008.py
from pathlib import Path from fastapi.testclient import TestClient from docs_src.custom_response import tutorial008_py39 from docs_src.custom_response.tutorial008_py39 import app client = TestClient(app) def test_get(tmp_path: Path): file_path: Path = tmp_path / "large-video-file.mp4" tutorial008_py39.some_file_path = str(file_path) test_content = b"Fake video bytes" file_path.write_bytes(test_content)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 502 bytes - Viewed (0) -
docs/en/docs/tutorial/body-nested-models.md
This would mean that **FastAPI** would expect a body similar to: ```JSON { "name": "Foo", "description": "The pretender", "price": 42.0, "tax": 3.2, "tags": ["rock", "metal", "bar"], "image": { "url": "http://example.com/baz.jpg", "name": "The Foo live" } } ``` Again, doing just that declaration, with **FastAPI** you get:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 6.7K bytes - Viewed (0)