- Sort Score
- Result 10 results
- Languages All
Results 731 - 740 of 1,962 for fastapi (0.04 sec)
-
docs_src/custom_response/tutorial008.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Jul 19 19:14:58 UTC 2021 - 360 bytes - Viewed (0) -
tests/test_route_scope.py
import pytest from fastapi import FastAPI, Request, WebSocket, WebSocketDisconnect from fastapi.routing import APIRoute, APIWebSocketRoute from fastapi.testclient import TestClient app = FastAPI() @app.get("/users/{user_id}") async def get_user(user_id: str, request: Request): route: APIRoute = request.scope["route"] return {"user_id": user_id, "path": route.path} @app.websocket("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Feb 08 10:23:07 UTC 2023 - 1.5K bytes - Viewed (0) -
docs/pt/docs/advanced/custom-response.md
E será documentado como tal no OpenAPI. /// /// tip | Dica A `ORJSONResponse` está disponível apenas no FastAPI, e não no Starlette. /// ## Resposta HTML Para retornar uma resposta com HTML diretamente do **FastAPI**, utilize `HTMLResponse`. * Importe `HTMLResponse` * Passe `HTMLResponse` como o parâmetro de `response_class` do seu *decorador de operação de rota*.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 29 11:47:10 UTC 2024 - 13.5K bytes - Viewed (0) -
docs_src/websockets/tutorial002.py
from typing import Union from fastapi import ( Cookie, Depends, FastAPI, Query, WebSocket, WebSocketException, status, ) from fastapi.responses import HTMLResponse app = FastAPI() html = """ <!DOCTYPE html> <html> <head> <title>Chat</title> </head> <body> <h1>WebSocket Chat</h1> <form action="" onsubmit="sendMessage(event)">
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Nov 13 16:10:54 UTC 2022 - 2.8K bytes - Viewed (0) -
docs/em/docs/advanced/response-directly.md
``` /// note | "📡 ℹ" 👆 💪 ⚙️ `from starlette.responses import JSONResponse`. **FastAPI** 🚚 🎏 `starlette.responses` `fastapi.responses` 🏪 👆, 👩💻. ✋️ 🌅 💪 📨 👟 🔗 ⚪️➡️ 💃. /// ## 🛬 🛃 `Response` 🖼 🔛 🎦 🌐 🍕 👆 💪, ✋️ ⚫️ 🚫 📶 ⚠, 👆 💪 ✔️ 📨 `item` 🔗, & **FastAPI** 🔜 🚮 ⚫️ `JSONResponse` 👆, 🏭 ⚫️ `dict`, ♒️. 🌐 👈 🔢. 🔜, ➡️ 👀 ❔ 👆 💪 ⚙️ 👈 📨 🛃 📨.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.6K bytes - Viewed (0) -
docs_src/response_model/tutorial003_04.py
from typing import Union from fastapi import FastAPI, Response from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/portal") async def get_portal(teleport: bool = False) -> Union[Response, dict]: if teleport: return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Jan 10 16:22:47 UTC 2023 - 384 bytes - Viewed (0) -
tests/test_security_oauth2_optional.py
from typing import Optional from dirty_equals import IsDict from fastapi import Depends, FastAPI, Security from fastapi.security import OAuth2, OAuth2PasswordRequestFormStrict from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() reusable_oauth2 = OAuth2( flows={ "password": { "tokenUrl": "token", "scopes": {"read:users": "Read the users", "write:users": "Create users"},
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.8K bytes - Viewed (0) -
docs/pt/docs/deployment/server-workers.md
/// ## Vários trabalhadores Você pode iniciar vários trabalhadores com a opção de linha de comando `--workers`: //// tab | `fastapi` Se você usar o comando `fastapi`: <div class="termy"> ```console $ <pre> <font color="#4E9A06">fastapi</font> run --workers 4 <u style="text-decoration-style:single">main.py</u> <font color="#3465A4">INFO </font> Using path <font color="#3465A4">main.py</font>
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 20 11:01:03 UTC 2024 - 9K bytes - Viewed (0) -
docs/em/docs/advanced/async-tests.md
# 🔁 💯 👆 ✔️ ⏪ 👀 ❔ 💯 👆 **FastAPI** 🈸 ⚙️ 🚚 `TestClient`. 🆙 🔜, 👆 ✔️ 🕴 👀 ❔ ✍ 🔁 💯, 🍵 ⚙️ `async` 🔢. ➖ 💪 ⚙️ 🔁 🔢 👆 💯 💪 ⚠, 🖼, 🕐❔ 👆 🔬 👆 💽 🔁. 🌈 👆 💚 💯 📨 📨 👆 FastAPI 🈸 & ⤴️ ✔ 👈 👆 👩💻 ⏪ ✍ ☑ 💽 💽, ⏪ ⚙️ 🔁 💽 🗃. ➡️ 👀 ❔ 👥 💪 ⚒ 👈 👷. ## pytest.mark.anyio 🚥 👥 💚 🤙 🔁 🔢 👆 💯, 👆 💯 🔢 ✔️ 🔁. AnyIO 🚚 👌 📁 👉, 👈 ✔ 👥 ✔ 👈 💯 🔢 🤙 🔁. ## 🇸🇲
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3K bytes - Viewed (0) -
tests/test_starlette_exception.py
from fastapi import FastAPI, HTTPException from fastapi.testclient import TestClient from starlette.exceptions import HTTPException as StarletteHTTPException app = FastAPI() items = {"foo": "The Foo Wrestlers"} @app.get("/items/{item_id}") async def read_item(item_id: str): if item_id not in items: raise HTTPException( status_code=404, detail="Item not found",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 7.4K bytes - Viewed (0)