- Sort Score
- Num 10 results
- Language All
Results 1501 - 1510 of 3,208 for report (0.4 seconds)
-
docs/pt/docs/advanced/middleware.md
Para isso, você usa `app.add_middleware()` (como no exemplo para CORS). ```Python from fastapi import FastAPI from unicorn import UnicornMiddleware app = FastAPI() app.add_middleware(UnicornMiddleware, some_config="rainbow") ```
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 4.7K bytes - Click Count (0) -
docs/zh/docs/advanced/middleware.md
因此,有些第三方 ASGI 中间件的文档推荐以如下方式使用中间件: ```Python from unicorn import UnicornMiddleware app = SomeASGIApp() new_app = UnicornMiddleware(app, some_config="rainbow") ``` 但 FastAPI(实际上是 Starlette)提供了一种更简单的方式,能让内部中间件在处理服务器错误的同时,还能让自定义异常处理器正常运作。 为此,要使用 `app.add_middleware()` (与 CORS 中的示例一样)。 ```Python from fastapi import FastAPI from unicorn import UnicornMiddleware app = FastAPI()
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 17:48:49 GMT 2025 - 3.5K bytes - Click Count (0) -
docs/fr/docs/tutorial/debugging.md
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sun Oct 27 17:31:14 GMT 2024 - 2.9K bytes - Click Count (0) -
docs/pt/docs/tutorial/debugging.md
Então, a seção: ```Python uvicorn.run(app, host="0.0.0.0", port=8000) ``` vai executar. --- Isso não acontecerá se você importar esse módulo (arquivo). Então, se você tiver outro arquivo `importer.py` com: ```Python from myapp import app # Mais um pouco de código ```Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 2.7K bytes - Click Count (0) -
docs/zh/docs/advanced/response-headers.md
按照[直接返回响应](response-directly.md){.internal-link target=_blank}中所述创建响应,并将头部作为附加参数传递: {* ../../docs_src/response_headers/tutorial001.py hl[10:12] *} /// note | 技术细节 你也可以使用`from starlette.responses import Response`或`from starlette.responses import JSONResponse`。 **FastAPI**提供了与`fastapi.responses`相同的`starlette.responses`,只是为了方便开发者。但是,大多数可用的响应都直接来自Starlette。 由于`Response`经常用于设置头部和cookies,因此**FastAPI**还在`fastapi.Response`中提供了它。 ///Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 17:48:49 GMT 2025 - 2K bytes - Click Count (0) -
docs/de/docs/tutorial/handling-errors.md
```JSON {"message": "Oops! yolo did something. There goes a rainbow..."} ``` /// note | Technische Details Sie könnten auch `from starlette.requests import Request` und `from starlette.responses import JSONResponse` verwenden.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 10.4K bytes - Click Count (0) -
docs/sts/web-identity.md
``` ## Using WebIdentity API ``` export MINIO_ROOT_USER=minio export MINIO_ROOT_PASSWORD=minio123 export MINIO_IDENTITY_OPENID_CONFIG_URL=https://accounts.google.com/.well-known/openid-configuration export MINIO_IDENTITY_OPENID_CLIENT_ID="843351d4-1080-11ea-aa20-271ecba3924a" # Optional: Allow to specify the requested OpenID scopes (OpenID only requires the `openid` scope) #export MINIO_IDENTITY_OPENID_SCOPES="openid,profile,email"
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Tue Aug 12 18:20:36 GMT 2025 - 18.9K bytes - Click Count (0) -
tests/test_request_body_parameters_media_type.py
from fastapi import Body, FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() media_type = "application/vnd.api+json" # NOTE: These are not valid JSON:API resources # but they are fine for testing requestBody with custom media_type class Product(BaseModel): name: str price: float class Shop(BaseModel): name: str @app.post("/products")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 6.3K bytes - Click Count (0) -
docs/es/docs/deployment/manually.md
<u style="text-decoration-style:solid">from </u><u style="text-decoration-style:solid"><b>main</b></u><u style="text-decoration-style:solid"> import </u><u style="text-decoration-style:solid"><b>app</b></u> <span style="background-color:#007166"><font color="#D3D7CF"> app </font></span> Using import string: <font color="#3465A4">main:app</font>Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 10:15:01 GMT 2025 - 7.3K bytes - Click Count (0) -
src/bytes/example_test.go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package bytes_test import ( "bytes" "encoding/base64" "fmt" "io" "os" "slices" "strconv" "unicode" ) func ExampleBuffer() { var b bytes.Buffer // A Buffer needs no initialization. b.Write([]byte("Hello ")) fmt.Fprintf(&b, "world!")
Created: Tue Dec 30 11:13:12 GMT 2025 - Last Modified: Mon May 12 16:07:54 GMT 2025 - 16.5K bytes - Click Count (0)