- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 2,000 for Fastapi (0.06 sec)
-
tests/test_security_api_key_cookie_optional.py
from typing import Optional from fastapi import Depends, FastAPI, Security from fastapi.security import APIKeyCookie from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyCookie(name="key", auto_error=False) class User(BaseModel): username: str def get_current_user(oauth_header: Optional[str] = Security(api_key)): if oauth_header is None: return None
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
tests/test_security_api_key_query_optional.py
from typing import Optional from fastapi import Depends, FastAPI, Security from fastapi.security import APIKeyQuery from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyQuery(name="key", auto_error=False) class User(BaseModel): username: str def get_current_user(oauth_header: Optional[str] = Security(api_key)): if oauth_header is None: return None
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2K bytes - Viewed (0) -
docs/en/docs/project-generation.md
## Full Stack FastAPI Template - Technology Stack and Features - β‘ [**FastAPI**](https://fastapi.tiangolo.com) for the Python backend API. - π§° [SQLModel](https://sqlmodel.tiangolo.com) for the Python SQL database interactions (ORM). - π [Pydantic](https://docs.pydantic.dev), used by FastAPI, for the data validation and settings management.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Oct 04 11:16:34 UTC 2024 - 1.9K bytes - Viewed (0) -
docs_src/extending_openapi/tutorial001.py
from fastapi import FastAPI from fastapi.openapi.utils import get_openapi app = FastAPI() @app.get("/items/") async def read_items(): return [{"name": "Foo"}] def custom_openapi(): if app.openapi_schema: return app.openapi_schema openapi_schema = get_openapi( title="Custom title", version="2.5.0", summary="This is a very custom OpenAPI schema",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 737 bytes - Viewed (0) -
tests/test_openapi_route_extensions.py
from fastapi import FastAPI from fastapi.testclient import TestClient app = FastAPI() @app.get("/", openapi_extra={"x-custom-extension": "value"}) def route_with_extras(): return {} client = TestClient(app) def test_get_route(): response = client.get("/") assert response.status_code == 200, response.text assert response.json() == {} def test_openapi():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.1K bytes - Viewed (0) -
docs_src/custom_response/tutorial006c.py
from fastapi import FastAPI from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/pydantic", response_class=RedirectResponse, status_code=302) async def redirect_pydantic():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Mar 22 01:42:11 UTC 2024 - 237 bytes - Viewed (0) -
docs/em/docs/tutorial/testing.md
**FastAPI** π π `starlette.testclient` `fastapi.testclient` πͺ π, π©βπ». βοΈ β«οΈ π π βͺοΈβ‘οΈ π. /// /// tip π₯ π π π€ `async` π’ π π― βοΈ βͺοΈβ‘οΈ π¨ π¨ π FastAPI πΈ (β π π½ π’), βοΈ π [π π―](../advanced/async-tests.md){.internal-link target=_blank} π§ π°. /// ## π π― π° πΈ, π π² π βοΈ π π― π π. & π **FastAPI** πΈ 5οΈβ£π β π π/πΉ, βοΈ. ### **FastAPI** π± π
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.1K bytes - Viewed (0) -
docs_src/response_model/tutorial003_03.py
from fastapi import FastAPI from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/teleport") async def get_teleport() -> RedirectResponse:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Jan 10 16:22:47 UTC 2023 - 241 bytes - Viewed (0) -
docs/es/docs/project-generation.md
Repositorio en GitHub: [Full Stack FastAPI Template](https://github.com/tiangolo/full-stack-fastapi-template) ## Plantilla de FastAPI Full Stack - TecnologΓa y CaracterΓsticas - β‘ [**FastAPI**](https://fastapi.tiangolo.com) para el backend API en Python. - π§° [SQLModel](https://sqlmodel.tiangolo.com) para las interacciones con la base de datos SQL en Python (ORM).
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Oct 04 11:16:34 UTC 2024 - 2K bytes - Viewed (0) -
tests/test_additional_properties_bool.py
from typing import Union from dirty_equals import IsDict from fastapi import FastAPI from fastapi._compat import PYDANTIC_V2 from fastapi.testclient import TestClient from pydantic import BaseModel, ConfigDict class FooBaseModel(BaseModel): if PYDANTIC_V2: model_config = ConfigDict(extra="forbid") else: class Config: extra = "forbid" class Foo(FooBaseModel): pass
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.2K bytes - Viewed (0)