- Sort Score
- Result 10 results
- Languages All
Results 901 - 910 of 1,080 for Str (0.04 sec)
-
docs/zh/docs/tutorial/body.md
{!> ../../docs_src/body/tutorial004.py!} ``` //// 函数参数按如下规则进行识别: - **路径**中声明了相同参数的参数,是路径参数 - 类型是(`int`、`float`、`str`、`bool` 等)**单类型**的参数,是**查询**参数 - 类型是 **Pydantic 模型**的参数,是**请求体** /// note | "笔记" 因为默认值是 `None`, FastAPI 会把 `q` 当作可选参数。 FastAPI 不使用 `Optional[str]` 中的 `Optional`, 但 `Optional` 可以让编辑器提供更好的支持,并检测错误。 /// ## 不使用 Pydantic
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.4K bytes - Viewed (0) -
docs/pt/docs/tutorial/body.md
* Se o parâmetro é de um **tipo único** (como `int`, `float`, `str`, `bool`, etc) será interpretado como um parâmetro de **consulta**. * Se o parâmetro é declarado como um **modelo Pydantic**, será interpretado como o **corpo** da requisição. /// note | "Observação" O FastAPI saberá que o valor de `q` não é obrigatório por causa do valor padrão `= None`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.1K bytes - Viewed (0) -
compat/maven-embedder/src/test/java/org/apache/maven/cli/props/MavenPropertiesTest.java
@Test public void testSubstitution() throws IOException { String str = "port = 4141" + LINE_SEPARATOR + "host = localhost" + LINE_SEPARATOR + "url = https://${host}:${port}/service" + LINE_SEPARATOR; MavenProperties properties = new MavenProperties(); properties.load(new StringReader(str)); properties.put("url", "https://localhost:4141/service");
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 16.4K bytes - Viewed (0) -
docs/hu/docs/index.md
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float is_offer: Union[bool, None] = None @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} @app.put("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 20.2K bytes - Viewed (0) -
docs/en/docs/tutorial/body-multiple-params.md
As, by default, singular values are interpreted as query parameters, you don't have to explicitly add a `Query`, you can just do: ```Python q: Union[str, None] = None ``` Or in Python 3.10 and above: ```Python q: str | None = None ``` For example: //// tab | Python 3.10+ ```Python hl_lines="28" {!> ../../docs_src/body_multiple_params/tutorial004_an_py310.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.6K bytes - Viewed (0) -
docs/de/docs/tutorial/body-multiple-params.md
Da einfache Werte standardmäßig als Query-Parameter interpretiert werden, müssen Sie `Query` nicht explizit hinzufügen, Sie können einfach schreiben: ```Python q: Union[str, None] = None ``` Oder in Python 3.10 und darüber: ```Python q: str | None = None ``` Zum Beispiel: //// tab | Python 3.10+ ```Python hl_lines="27" {!> ../../docs_src/body_multiple_params/tutorial004_an_py310.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.2K bytes - Viewed (0) -
tests/embedded_struct_test.go
} func (c *Content) Scan(src interface{}) error { var value Content str, ok := src.(string) if !ok { byt, ok := src.([]byte) if !ok { return errors.New("Embedded.Scan byte assertion failed") } if err := json.Unmarshal(byt, &value); err != nil { return err } } else { if err := json.Unmarshal([]byte(str), &value); err != nil { return err } } *c = value
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed May 08 04:07:58 UTC 2024 - 7.3K bytes - Viewed (0) -
docs/fr/docs/index.md
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float is_offer: Union[bool, None] = None @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} @app.put("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 22K bytes - Viewed (0) -
docs/zh-hant/docs/index.md
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float is_offer: Union[bool, None] = None @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} @app.put("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 18.8K bytes - Viewed (0) -
istioctl/pkg/workload/workload.go
// splitEqual splits key=value string into key,value. if no = is found // the whole string is the key and value is empty. func splitEqual(str string) (string, string) { idx := strings.Index(str, "=") var k string var v string if idx >= 0 { k = str[:idx] v = str[idx+1:] } else { k = str } return k, v }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Aug 15 16:31:46 UTC 2024 - 25.3K bytes - Viewed (0)