- Sort Score
- Result 10 results
- Languages All
Results 2751 - 2760 of 3,253 for classof (0.1 sec)
-
docs/zh/docs/advanced/response-directly.md
/// ## 返回自定义 `Response` 上面的例子展示了需要的所有部分,但还不够实用,因为你本可以只是直接返回 `item`,而**FastAPI** 默认帮你把这个 `item` 放到 `JSONResponse` 中,又默认将其转换成了 `dict`等等。 现在,让我们看看你如何才能返回一个自定义的响应。 假设你想要返回一个 <a href="https://en.wikipedia.org/wiki/XML" class="external-link" target="_blank">XML</a> 响应。 你可以把你的 XML 内容放到一个字符串中,放到一个 `Response` 中,然后返回。 ```Python hl_lines="1 18" {!../../docs_src/response_directly/tutorial002.py!} ``` ## 说明
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.1K bytes - Viewed (0) -
docs/zh/docs/deployment/versions.md
# 关于 FastAPI 版本 **FastAPI** 已在许多应用程序和系统的生产环境中使用。 并且测试覆盖率保持在100%。 但其开发进度仍在快速推进。 经常添加新功能,定期修复错误,并且代码仍在持续改进。 这就是为什么当前版本仍然是`0.x.x`,这反映出每个版本都可能有Breaking changes。 这遵循<a href="https://semver.org/" class="external-link" target="_blank">语义版本控制</a>的约定。 你现在就可以使用 **FastAPI** 创建生产环境应用程序(你可能已经这样做了一段时间),你只需确保使用的版本可以与其余代码正确配合即可。 ## 固定你的 `fastapi` 版本 你应该做的第一件事是将你正在使用的 **FastAPI** 版本“固定”到你知道适用于你的应用程序的特定最新版本。 例如,假设你在应用程序中使用版本`0.45.0`。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 3.1K bytes - Viewed (0) -
tests/test_security_oauth2.py
reusable_oauth2 = OAuth2( flows={ "password": { "tokenUrl": "token", "scopes": {"read:users": "Read the users", "write:users": "Create users"}, } } ) class User(BaseModel): username: str # Here we use string annotations to test them def get_current_user(oauth_header: "str" = Security(reusable_oauth2)): user = User(username=oauth_header) return user
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.7K bytes - Viewed (0) -
tests/test_security_oauth2_optional_description.py
"tokenUrl": "token", "scopes": {"read:users": "Read the users", "write:users": "Create users"}, } }, description="OAuth2 security scheme", auto_error=False, ) class User(BaseModel): username: str def get_current_user(oauth_header: Optional[str] = Security(reusable_oauth2)): if oauth_header is None: return None user = User(username=oauth_header)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.9K bytes - Viewed (0) -
internal/disk/stat_linux.go
// Check if there is a parent device: // e.g. if the mount is based on /dev/nvme0n1p1, let's calculate the // real device name (nvme0n1) to get its sysfs information parentDevPath, e := os.Readlink("/sys/class/block/" + devName) if e == nil { parentDev := filepath.Base(filepath.Dir(parentDevPath)) qst, err = bfs.SysBlockDeviceQueueStats(parentDev) } } if err == nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Feb 26 19:34:50 UTC 2024 - 4.8K bytes - Viewed (0) -
src/test/java/org/codelibs/opensearch/extension/analysis/SynonymLoader.java
import org.opensearch.common.settings.Settings; import org.opensearch.common.unit.TimeValue; import org.opensearch.env.Environment; import org.opensearch.index.analysis.Analysis; public class SynonymLoader { private File reloadableFile = null; private final Analyzer analyzer; private final Settings settings; private final boolean expand; private long reloadInterval = 0;
Registered: Fri Nov 08 09:08:12 UTC 2024 - Last Modified: Thu Feb 22 01:36:54 UTC 2024 - 6.7K bytes - Viewed (0) -
docs/changelogs/upgrading_to_okhttp_4.md
R8 / ProGuard ------------- R8 and ProGuard are both code optimizers for `.class` files. R8 is the [default optimizer][r8] in Android Studio 3.4 and newer. It works well with all releases of OkHttp. ProGuard was the previous default. We’re [tracking problems][proguard_problems] with interactions between ProGuard, OkHttp 4.x, and Kotlin-originated `.class` files. Make sure you’re on the latest release if you’re using ProGuard,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 06 16:58:16 UTC 2022 - 10.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt
* stale). */ class CacheStrategy internal constructor( /** The request to send on the network, or null if this call doesn't use the network. */ val networkRequest: Request?, /** The cached response to return or validate; or null if this call doesn't use a cache. */ val cacheResponse: Response?, ) { class Factory( private val nowMillis: Long, internal val request: Request,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:24:48 UTC 2024 - 12K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb1/com/SmbComNegotiateResponse.java
import jcifs.util.Hexdump; import jcifs.util.Strings; import jcifs.util.transport.Response; /** * */ public class SmbComNegotiateResponse extends ServerMessageBlock implements SmbNegotiationResponse { private static final Logger log = LoggerFactory.getLogger(SmbComNegotiateResponse.class); private int dialectIndex; /* Negotiated values */ private ServerData server; private int negotiatedFlags2;
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Tue Jul 07 10:52:42 UTC 2020 - 15.4K bytes - Viewed (0) -
docs/pt/docs/advanced/events.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.6K bytes - Viewed (0)