- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 1,929 for FastAPI (0.1 sec)
-
docs_src/templates/tutorial001.py
from fastapi import FastAPI, Request from fastapi.responses import HTMLResponse from fastapi.staticfiles import StaticFiles from fastapi.templating import Jinja2Templates app = FastAPI() app.mount("/static", StaticFiles(directory="static"), name="static") templates = Jinja2Templates(directory="templates") @app.get("/items/{id}", response_class=HTMLResponse) async def read_item(request: Request, id: str):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Dec 26 20:12:34 UTC 2023 - 521 bytes - Viewed (0) -
tests/test_tutorial/test_events/test_tutorial002.py
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient @pytest.fixture(name="app", scope="module") def get_app(): with pytest.warns(DeprecationWarning): from docs_src.events.tutorial002 import app yield app def test_events(app: FastAPI): with TestClient(app) as client: response = client.get("/items/") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 18 12:36:40 UTC 2023 - 1.4K bytes - Viewed (0) -
docs/tr/docs/features.md
* FastAPI ile yapılan bir çok proje insanlar tarafından kullanılıyor. ## Starlette özellikleri **FastAPI**, <a href="https://www.starlette.io/" class="external-link" target="_blank"><strong>Starlette</strong></a> ile tamamiyle uyumlu ve üzerine kurulu. Yani FastAPI üzerine ekleme yapacağınız herhangi bir Starlette kodu da çalışacaktır.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 11.1K bytes - Viewed (0) -
docs/en/docs/how-to/graphql.md
## GraphQL Libraries Here are some of the **GraphQL** libraries that have **ASGI** support. You could use them with **FastAPI**: * <a href="https://strawberry.rocks/" class="external-link" target="_blank">Strawberry</a> 🍓 * With <a href="https://strawberry.rocks/docs/integrations/fastapi" class="external-link" target="_blank">docs for FastAPI</a> * <a href="https://ariadnegraphql.org/" class="external-link" target="_blank">Ariadne</a>
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 22:39:38 UTC 2024 - 3.3K bytes - Viewed (0) -
tests/test_fastapi_cli.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 02 06:03:05 UTC 2024 - 790 bytes - Viewed (0) -
fastapi/security/oauth2.py
from typing import Any, Dict, List, Optional, Union, cast from fastapi.exceptions import HTTPException from fastapi.openapi.models import OAuth2 as OAuth2Model from fastapi.openapi.models import OAuthFlows as OAuthFlowsModel from fastapi.param_functions import Form from fastapi.security.base import SecurityBase from fastapi.security.utils import get_authorization_scheme_param from starlette.requests import Request
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 23 18:30:18 UTC 2024 - 21.1K bytes - Viewed (0) -
tests/test_security_http_bearer_optional.py
from typing import Optional from fastapi import FastAPI, Security from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer from fastapi.testclient import TestClient app = FastAPI() security = HTTPBearer(auto_error=False) @app.get("/users/me") def read_current_user( credentials: Optional[HTTPAuthorizationCredentials] = Security(security), ): if credentials is 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_oauth2_authorization_code_bearer_description.py
from typing import Optional from fastapi import FastAPI, Security from fastapi.security import OAuth2AuthorizationCodeBearer from fastapi.testclient import TestClient app = FastAPI() oauth2_scheme = OAuth2AuthorizationCodeBearer( authorizationUrl="authorize", tokenUrl="token", description="OAuth2 Code Bearer", auto_error=True, ) @app.get("/items/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.4K bytes - Viewed (0) -
tests/test_security_oauth2_password_bearer_optional.py
from typing import Optional from fastapi import FastAPI, Security from fastapi.security import OAuth2PasswordBearer from fastapi.testclient import TestClient app = FastAPI() oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/token", auto_error=False) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): if token is None: return {"msg": "Create an account first"} return {"token": token}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
docs_src/custom_request_and_route/tutorial002.py
from typing import Callable, List from fastapi import Body, FastAPI, HTTPException, Request, Response from fastapi.exceptions import RequestValidationError from fastapi.routing import APIRoute class ValidationErrorLoggingRoute(APIRoute): def get_route_handler(self) -> Callable: original_route_handler = super().get_route_handler() async def custom_route_handler(request: Request) -> Response: try:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 932 bytes - Viewed (0)