- Sort Score
- Result 10 results
- Languages All
Results 1021 - 1030 of 1,916 for FastApi (0.06 sec)
-
tests/test_tutorial/test_debugging/test_tutorial001.py
import importlib import runpy import sys import unittest import pytest from fastapi.testclient import TestClient MOD_NAME = "docs_src.debugging.tutorial001_py39" @pytest.fixture(name="client") def get_client(): mod = importlib.import_module(MOD_NAME) client = TestClient(mod.app) return client def test_uvicorn_run_is_not_called_on_import(): if sys.modules.get(MOD_NAME):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 1.8K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008c.py
import importlib from types import ModuleType import pytest from fastapi.exceptions import FastAPIError from fastapi.testclient import TestClient @pytest.fixture( name="mod", params=[ pytest.param("tutorial008c_py39"), pytest.param("tutorial008c_an_py39"), ], ) def get_mod(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.dependencies.{request.param}") return mod
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_no_schema_split.py
# Test with parts from, and to verify the report in: # https://github.com/fastapi/fastapi/discussions/14177 # Made an issue in: # https://github.com/fastapi/fastapi/issues/14247 from enum import Enum from fastapi import FastAPI from fastapi.testclient import TestClient from inline_snapshot import snapshot from pydantic import BaseModel, Field class MessageEventType(str, Enum): alpha = "alpha" beta = "beta"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 6.4K bytes - Viewed (0) -
docs/pt/docs/async.md
Se você estivar trabalhando com **FastAPI** não terá que se preocupar com isso, porquê essa "primeira" função será a sua *função de operação de rota*, e o FastAPI saberá como fazer a coisa certa. Mas se você quiser usar `async` / `await` sem FastAPI, você também pode fazê-lo. ### Escreva seu próprio código assíncrono { #write-your-own-async-code }
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Nov 12 16:23:57 UTC 2025 - 25.8K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial006b.py
from fastapi.testclient import TestClient from docs_src.custom_response.tutorial006b_py39 import app client = TestClient(app) def test_redirect_response_class(): response = client.get("/fastapi", follow_redirects=False) assert response.status_code == 307 assert response.headers["location"] == "https://fastapi.tiangolo.com" def test_openapi_schema(): response = client.get("/openapi.json")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 904 bytes - Viewed (0) -
docs/zh/docs/advanced/security/oauth2-scopes.md
**FastAPI** 无缝集成 OAuth2 作用域(`Scopes`),可以直接使用。 作用域是更精密的权限系统,遵循 OAuth2 标准,与 OpenAPI 应用(和 API 自动文档)集成。 OAuth2 也是脸书、谷歌、GitHub、微软、推特等第三方身份验证应用使用的机制。这些身份验证应用在用户登录应用时使用 OAuth2 提供指定权限。 脸书、谷歌、GitHub、微软、推特就是 OAuth2 作用域登录。 本章介绍如何在 **FastAPI** 应用中使用 OAuth2 作用域管理验证与授权。 /// warning | 警告 本章内容较难,刚接触 FastAPI 的新手可以跳过。 OAuth2 作用域不是必需的,没有它,您也可以处理身份验证与授权。 但 OAuth2 作用域与 API(通过 OpenAPI)及 API 文档集成地更好。
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Dec 29 20:41:04 UTC 2024 - 11.6K bytes - Viewed (0) -
fastapi/params.py
import warnings from collections.abc import Sequence from dataclasses import dataclass from enum import Enum from typing import Annotated, Any, Callable, Optional, Union from fastapi.exceptions import FastAPIDeprecationWarning from fastapi.openapi.models import Example from pydantic import AliasChoices, AliasPath from pydantic.fields import FieldInfo from typing_extensions import Literal, deprecated from ._compat import ( Undefined, )
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 26.3K bytes - Viewed (0) -
docs_src/sql_databases/tutorial002_an_py39.py
from typing import Annotated, Union from fastapi import Depends, FastAPI, HTTPException, Query from sqlmodel import Field, Session, SQLModel, create_engine, select class HeroBase(SQLModel): name: str = Field(index=True) age: Union[int, None] = Field(default=None, index=True) class Hero(HeroBase, table=True): id: Union[int, None] = Field(default=None, primary_key=True) secret_name: str class HeroPublic(HeroBase):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 2.5K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial005.py
import importlib import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial005_py39"), pytest.param("tutorial005_py310", marks=needs_py310), pytest.param("tutorial005_an_py39"), pytest.param("tutorial005_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 6.1K bytes - Viewed (0) -
docs/de/docs/_llm-test.md
* <a href="https://sqlmodel.tiangolo.com/" class="external-link" target="_blank">Externer Link</a> * <a href="https://fastapi.tiangolo.com/css/styles.css" class="external-link" target="_blank">Link zu einem Stil</a> * <a href="https://fastapi.tiangolo.com/js/logic.js" class="external-link" target="_blank">Link zu einem Skript</a> * <a href="https://fastapi.tiangolo.com/img/foo.jpg" class="external-link" target="_blank">Link zu einem Bild</a>
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 07:17:04 UTC 2025 - 12.6K bytes - Viewed (0)