- Sort Score
- Result 10 results
- Languages All
Results 471 - 480 of 1,094 for Fstr (0.03 sec)
-
docs/em/docs/tutorial/dependencies/sub-dependencies.md
``` //// //// tab | 🐍 3️⃣.1️⃣0️⃣ & 🔛 ```Python hl_lines="6-7" {!> ../../docs_src/dependencies/tutorial005_py310.py!} ``` //// ⚫️ 📣 📦 🔢 🔢 `q` `str`, & ⤴️ ⚫️ 📨 ⚫️. 👉 🙅 (🚫 📶 ⚠), ✋️ 🔜 ℹ 👥 🎯 🔛 ❔ 🎧-🔗 👷. ## 🥈 🔗, "☑" & "⚓️" ⤴️ 👆 💪 ✍ ➕1️⃣ 🔗 🔢 ("☑") 👈 🎏 🕰 📣 🔗 🚮 👍 (⚫️ "⚓️" 💁♂️): //// tab | 🐍 3️⃣.6️⃣ & 🔛
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.3K bytes - Viewed (0) -
docs/zh/docs/tutorial/dependencies/sub-dependencies.md
FastAPI 支持创建含**子依赖项**的依赖项。 并且,可以按需声明任意**深度**的子依赖项嵌套层级。 **FastAPI** 负责处理解析不同深度的子依赖项。 ### 第一层依赖项 下列代码创建了第一层依赖项: ```Python hl_lines="8-9" {!../../docs_src/dependencies/tutorial005.py!} ``` 这段代码声明了类型为 `str` 的可选查询参数 `q`,然后返回这个查询参数。 这个函数很简单(不过也没什么用),但却有助于让我们专注于了解子依赖项的工作方式。 ### 第二层依赖项 接下来,创建另一个依赖项函数,并同时用该依赖项自身再声明一个依赖项(所以这也是一个「依赖项」): ```Python hl_lines="13" {!../../docs_src/dependencies/tutorial005.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.2K bytes - Viewed (0) -
tests/test_get_request_body.py
from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Product(BaseModel): name: str description: str = None # type: ignore price: float @app.get("/product") async def create_item(product: Product): return product client = TestClient(app) def test_get_with_body():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.7K bytes - Viewed (0) -
tests/test_repeated_parameter_alias.py
from fastapi import FastAPI, Path, Query, status from fastapi.testclient import TestClient app = FastAPI() @app.get("/{repeated_alias}") def get_parameters_with_repeated_aliases( path: str = Path(..., alias="repeated_alias"), query: str = Query(..., alias="repeated_alias"), ): return {"path": path, "query": query} client = TestClient(app) def test_get_parameters():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.7K bytes - Viewed (0) -
tests/test_starlette_urlconvertors.py
@app.get("/float/{param:float}") def float_convertor(param: float = Path()): return {"float": param} @app.get("/path/{param:path}") def path_convertor(param: str = Path()): return {"path": param} @app.get("/query/") def query_convertor(param: str = Query()): return {"query": param} client = TestClient(app) def test_route_converters_int(): # Test integer conversion
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Nov 27 14:46:06 UTC 2022 - 1.7K bytes - Viewed (0) -
src/archive/tar/strconv.go
// The size field ends at the first space. nStr, rest, ok := strings.Cut(s, " ") if !ok { return "", "", s, ErrHeader } // Parse the first token as a decimal integer. n, perr := strconv.ParseInt(nStr, 10, 0) // Intentionally parse as native int if perr != nil || n < 5 || n > int64(len(s)) { return "", "", s, ErrHeader } n -= int64(len(nStr) + 1) // convert from index in s to index in rest if n <= 0 {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Aug 01 14:28:42 UTC 2023 - 9K bytes - Viewed (0) -
guava/src/com/google/common/io/CharStreams.java
checkPositionIndexes(off, off + len, cbuf.length); } @Override public void write(String str) { checkNotNull(str); } @Override public void write(String str, int off, int len) { checkPositionIndexes(off, off + len, str.length()); } @Override public Writer append(@CheckForNull CharSequence csq) { return this; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed May 17 14:35:11 UTC 2023 - 10.9K bytes - Viewed (0) -
docs_src/sql_databases/tutorial001_an.py
from typing_extensions import Annotated class Hero(SQLModel, table=True): id: Union[int, None] = Field(default=None, primary_key=True) name: str = Field(index=True) age: Union[int, None] = Field(default=None, index=True) secret_name: str sqlite_file_name = "database.db" sqlite_url = f"sqlite:///{sqlite_file_name}" connect_args = {"check_same_thread": False}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 1.8K bytes - Viewed (0) -
tests/test_security_openid_connect_optional.py
from pydantic import BaseModel app = FastAPI() oid = OpenIdConnect(openIdConnectUrl="/openid", auto_error=False) class User(BaseModel): username: str def get_current_user(oauth_header: Optional[str] = Security(oid)): if oauth_header is None: return None user = User(username=oauth_header) return user @app.get("/users/me")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.4K bytes - Viewed (0) -
docs/ru/docs/tutorial/path-params.md
### Создание класса `Enum` Импортируйте `Enum` и создайте подкласс, который наследуется от `str` и `Enum`. Мы наследуемся от `str`, чтобы документация API могла понять, что значения должны быть типа `string` и отображалась правильно. Затем создайте атрибуты класса с фиксированными допустимыми значениями:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 14.1K bytes - Viewed (0)