- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for 5007 (0.31 sec)
-
tests/test_additional_responses_response_class.py
class JsonApiError(BaseModel): errors: typing.List[Error] @app.get( "/a", response_class=JsonApiResponse, responses={500: {"description": "Error", "model": JsonApiError}}, ) async def a(): pass # pragma: no cover @app.get("/b", responses={500: {"description": "Error", "model": Error}}) async def b(): pass # pragma: no cover client = TestClient(app)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.5K bytes - Viewed (0) -
tests/test_response_code_no_body.py
status: str title: str class JsonApiError(BaseModel): errors: typing.List[Error] @app.get( "/a", status_code=204, response_class=JsonApiResponse, responses={500: {"description": "Error", "model": JsonApiError}}, ) async def a(): pass @app.get("/b", responses={204: {"description": "No Content"}}) async def b(): pass # pragma: no cover
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.2K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008d_an.py
from docs_src.dependencies.tutorial008d_an import app client = TestClient(app, raise_server_exceptions=False) response = client.get("/items/portal-gun") assert response.status_code == 500, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Feb 24 23:06:37 GMT 2024 - 1.2K bytes - Viewed (0) -
docs/en/docs/img/deployment/https/https01.drawio
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 12 00:06:16 GMT 2022 - 6.2K bytes - Viewed (0) -
docs/en/docs/advanced/middleware.md
```Python hl_lines="2 6" {!../../../docs_src/advanced_middleware/tutorial003.py!} ``` The following arguments are supported: * `minimum_size` - Do not GZip responses that are smaller than this minimum size in bytes. Defaults to `500`. ## Other middlewares There are many other ASGI middlewares. For example: * <a href="https://docs.sentry.io/platforms/python/guides/fastapi/" class="external-link" target="_blank">Sentry</a>
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 10 18:27:10 GMT 2023 - 4K bytes - Viewed (0) -
docs/em/docs/tutorial/response-status-code.md
* **`300`** & ๐ "โ". ๐จ โฎ๏ธ ๐ซ ๐ ๐ 5๏ธโฃ๐ โ๏ธ 5๏ธโฃ๐ ๐ซ โ๏ธ ๐ช, ๐ `304`, "๐ซ ๐", โ ๐ ๐ซ โ๏ธ 1๏ธโฃ. * **`400`** & ๐ "๐ฉโ๐ป โ" ๐จ. ๐ซ ๐ฅ ๐ ๐ ๐ ๐ฒ โ๏ธ ๐. * ๐ผ `404`, "๐ซ ๐" ๐จ. * ๐ โ โช๏ธโก๏ธ ๐ฉโ๐ป, ๐ ๐ช โ๏ธ `400`. * `500` & ๐ ๐ฝ โ. ๐ ๐ ๐ โ๏ธ ๐ซ ๐. ๐โ ๐ณ ๐ถ โ ๐ ๐ ๐ธ ๐, โ๏ธ ๐ฝ, โซ๏ธ ๐ ๐ ๐จ 1๏ธโฃ ๐ซ ๐ ๐. !!! tip
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 3.4K bytes - Viewed (0) -
docs/zh/docs/tutorial/handling-errors.md
**FastAPI** ่ฐ็จ็ๅฐฑๆฏ `RequestValidationError` ็ฑป๏ผๅ ๆญค๏ผๅฆๆๅจ `response_model` ไธญไฝฟ็จ Pydantic ๆจกๅ๏ผไธๆฐๆฎๆ้่ฏฏๆถ๏ผๅจๆฅๅฟไธญๅฐฑไผ็ๅฐ่ฟไธช้่ฏฏใ ไฝๅฎขๆท็ซฏๆ็จๆท็ไธๅฐ่ฟไธช้่ฏฏใๅไน๏ผๅฎขๆท็ซฏๆฅๆถๅฐ็ๆฏ HTTP ็ถๆ็ ไธบ `500` ็ใๅ ้จๆๅกๅจ้่ฏฏใใ ่ฟๆฏๅ ไธบๅจ*ๅๅบ*ๆไปฃ็ ๏ผไธๆฏๅจๅฎขๆท็ซฏ็่ฏทๆฑ้๏ผไธญๅบ็ฐ็ Pydantic `ValidationError` ๆฏไปฃ็ ็ bugใ ไฟฎๅค้่ฏฏๆถ๏ผๅฎขๆท็ซฏๆ็จๆทไธ่ฝ่ฎฟ้ฎ้่ฏฏ็ๅ ้จไฟกๆฏ๏ผๅฆๅไผ้ ๆๅฎๅ จ้ๆฃใ ### ่ฆ็ `HTTPException` ้่ฏฏๅค็ๅจ ๅ็๏ผไนๅฏไปฅ่ฆ็ `HTTPException` ๅค็ๅจใ
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 8.4K bytes - Viewed (0) -
docs/em/docs/tutorial/handling-errors.md
**FastAPI** โ๏ธ โซ๏ธ ๐, ๐ฅ ๐ โ๏ธ Pydantic ๐ท `response_model`, & ๐ ๐ฝ โ๏ธ โ, ๐ ๐ ๐ โ ๐ ๐น. โ๏ธ ๐ฉโ๐ป/๐ฉโ๐ป ๐ ๐ซ ๐ โซ๏ธ. โฉ๏ธ, ๐ฉโ๐ป ๐ ๐จ "๐ ๐ฝ โ" โฎ๏ธ ๐บ๐ธ๐ ๐ ๐ `500`. โซ๏ธ ๐ ๐ ๐ โฉ๏ธ ๐ฅ ๐ โ๏ธ Pydantic `ValidationError` ๐ *๐จ* โ๏ธ ๐ ๐ ๐ (๐ซ ๐ฉโ๐ป *๐จ*), โซ๏ธ ๐ค ๐ ๐ ๐. & โช ๐ ๐ง โซ๏ธ, ๐ ๐ฉโ๐ป/๐ฉโ๐ป ๐ซ๐ ๐ซ โ๏ธ ๐ ๐ โน ๐ โ, ๐ ๐ช ๐ฆ ๐โโ โ . ### ๐ `HTTPException` โ ๐โ๐ฆบ
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 8.3K bytes - Viewed (0) -
docs/en/docs/js/custom.js
ul.append(li) }) } setupTermynal(); showRandomAnnouncement('announce-left', 5000) showRandomAnnouncement('announce-right', 10000) }
JavaScript - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 08 17:50:56 GMT 2021 - 6.6K bytes - Viewed (0) -
tests/test_exception_handlers.py
def request_validation_exception_handler(request, exception): return JSONResponse({"exception": "request-validation"}) def server_error_exception_handler(request, exception): return JSONResponse(status_code=500, content={"exception": "server-error"}) app = FastAPI( exception_handlers={ HTTPException: http_exception_handler, RequestValidationError: request_validation_exception_handler,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Feb 17 12:40:12 GMT 2022 - 1.9K bytes - Viewed (0)