- Sort Score
- Result 10 results
- Languages All
Results 941 - 950 of 1,080 for Str (0.01 sec)
-
docs/pt/docs/tutorial/dependencies/classes-as-dependencies.md
## Classes como dependências Você deve ter percebido que para criar um instância de uma classe em Python, a mesma sintaxe é utilizada. Por exemplo: ```Python class Cat: def __init__(self, name: str): self.name = name fluffy = Cat(name="Mr Fluffy") ``` Nesse caso, `fluffy` é uma instância da classe `Cat`. E para criar `fluffy`, você está "chamando" `Cat`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.6K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/classes-as-dependencies.md
then it is a "callable". ## Classes as dependencies You might notice that to create an instance of a Python class, you use that same syntax. For example: ```Python class Cat: def __init__(self, name: str): self.name = name fluffy = Cat(name="Mr Fluffy") ``` In this case, `fluffy` is an instance of the class `Cat`. And to create `fluffy`, you are "calling" `Cat`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.1K bytes - Viewed (0) -
cni/pkg/nodeagent/podcgroupns.go
`(?:[[:^punct:]]*/*)*crio[[:punct:]]` + // non-punctuation end of string, i.e., the container ID `(?P<containerid>[[:^punct:]]+)$`), } func reSubMatchMap(r *regexp.Regexp, str string) map[string]string { match := r.FindStringSubmatch(str) if match == nil { return nil } subMatchMap := make(map[string]string) for i, name := range r.SubexpNames() { if i != 0 { subMatchMap[name] = match[i] } }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Apr 12 21:47:31 UTC 2024 - 11K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial010_an_py39.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 6.3K bytes - Viewed (0) -
docs/zh/docs/tutorial/response-model.md
## 响应模型编码参数 你的响应模型可以具有默认值,例如: ```Python hl_lines="11 13-14" {!../../docs_src/response_model/tutorial004.py!} ``` * `description: Union[str, None] = None` 具有默认值 `None`。 * `tax: float = 10.5` 具有默认值 `10.5`. * `tags: List[str] = []` 具有一个空列表作为默认值: `[]`. 但如果它们并没有存储实际的值,你可能想从结果中忽略它们的默认值。 举个例子,当你在 NoSQL 数据库中保存了具有许多可选属性的模型,但你又不想发送充满默认值的很长的 JSON 响应。 ### 使用 `response_model_exclude_unset` 参数
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.8K bytes - Viewed (0) -
src/bufio/bufio_test.go
b.ReportAllocs() str := strings.Repeat("x", 16<<10) for i := 0; i < b.N; i++ { br := NewReader(strings.NewReader(str)) n, err := io.Copy(io.Discard, br) if err != nil { b.Fatal(err) } if n != int64(len(str)) { b.Fatal("wrong length") } } } func BenchmarkWriterEmpty(b *testing.B) { b.ReportAllocs() str := strings.Repeat("x", 1<<10)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0) -
docs/ja/docs/tutorial/body-updates.md
項目を更新するには<a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT" class="external-link" target="_blank">HTTPの`PUT`</a>操作を使用することができます。 `jsonable_encoder`を用いて、入力データをJSON形式で保存できるデータに変換することができます(例:NoSQLデータベース)。例えば、`datetime`を`str`に変換します。 ```Python hl_lines="30 31 32 33 34 35" {!../../docs_src/body_updates/tutorial001.py!} ``` 既存のデータを置き換えるべきデータを受け取るために`PUT`は使用されます。 ### 置換についての注意 つまり、`PUT`を使用して以下のボディで項目`bar`を更新したい場合は:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.1K bytes - Viewed (0) -
docs/ja/docs/tutorial/path-operation-configuration.md
/// note | "技術詳細" また、`from starlette import status`を使用することもできます。 **FastAPI** は開発者の利便性を考慮して、`fastapi.status`と同じ`starlette.status`を提供しています。しかし、これはStarletteから直接提供されています。 /// ## タグ `tags`パラメータを`str`の`list`(通常は1つの`str`)と一緒に渡すと、*path operation*にタグを追加できます: ```Python hl_lines="17 22 27" {!../../docs_src/path_operation_configuration/tutorial002.py!} ``` これらはOpenAPIスキーマに追加され、自動ドキュメントのインターフェースで使用されます:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.3K bytes - Viewed (0) -
tests/test_serialize_response_dataclass.py
from datetime import datetime from typing import List, Optional from fastapi import FastAPI from fastapi.testclient import TestClient app = FastAPI() @dataclass class Item: name: str date: datetime price: Optional[float] = None owner_ids: Optional[List[int]] = None @app.get("/items/valid", response_model=Item) def get_valid():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 26 13:56:47 UTC 2022 - 4.9K bytes - Viewed (0) -
docs/pt/docs/advanced/custom-response.md
Você pode retorná-la diretamente. Ela aceita os seguintes parâmetros: * `content` - Uma sequência de caracteres (`str`) ou `bytes`. * `status_code` - Um código de status HTTP do tipo `int`. * `headers` - Um dicionário `dict` de strings. * `media_type` - Uma `str` informando o media type. E.g. `"text/html"`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 29 11:47:10 UTC 2024 - 13.5K bytes - Viewed (0)