- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 329 for Weights (0.08 sec)
-
tests/test_tutorial/test_body_nested_models/test_tutorial009_py39.py
data = {"2": 2.2, "3": 3.3} response = client.post("/index-weights/", json=data) assert response.status_code == 200, response.text assert response.json() == data @needs_py39 def test_post_invalid_body(client: TestClient): data = {"foo": 2.2, "3": 3.3} response = client.post("/index-weights/", json=data) assert response.status_code == 422, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 4.3K bytes - Viewed (0) -
tests/test_tutorial/test_body_nested_models/test_tutorial009.py
def test_post_body(client: TestClient): data = {"2": 2.2, "3": 3.3} response = client.post("/index-weights/", json=data) assert response.status_code == 200, response.text assert response.json() == data def test_post_invalid_body(client: TestClient): data = {"foo": 2.2, "3": 3.3} response = client.post("/index-weights/", json=data) assert response.status_code == 422, response.text assert response.json() == IsDict(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 4.2K bytes - Viewed (0) -
docs/de/docs/tutorial/body-nested-models.md
Das bedeutet, dass Ihre API-Clients nur Strings senden können, aber solange diese Strings nur Zahlen enthalten, wird Pydantic sie konvertieren und validieren. Und das `dict` welches Sie als `weights` erhalten, wird `int`-Schlüssel und `float`-Werte haben. /// ## Zusammenfassung Mit **FastAPI** haben Sie die maximale Flexibilität von Pydantic-Modellen, während Ihr Code einfach, kurz und elegant bleibt.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.3K bytes - Viewed (0) -
docs/pt/docs/tutorial/body-nested-models.md
Isso significa que, embora os clientes da API só possam enviar strings como chaves, desde que essas strings contenham inteiros puros, o Pydantic irá convertê-los e validá-los. E o `dict` que você recebe como `weights` terá, na verdade, chaves `int` e valores` float`. /// ## Recapitulação Com **FastAPI** você tem a flexibilidade máxima fornecida pelos modelos Pydantic, enquanto seu código é mantido simples, curto e elegante.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.4K bytes - Viewed (0) -
docs/em/docs/tutorial/body-nested-models.md
//// /// tip ✔️ 🤯 👈 🎻 🕴 🐕🦺 `str` 🔑. ✋️ Pydantic ✔️ 🏧 💽 🛠️. 👉 ⛓ 👈, ✋️ 👆 🛠️ 👩💻 💪 🕴 📨 🎻 🔑, 📏 👈 🎻 🔌 😁 🔢, Pydantic 🔜 🗜 👫 & ✔ 👫. & `dict` 👆 📨 `weights` 🔜 🤙 ✔️ `int` 🔑 & `float` 💲. /// ## 🌃 ⏮️ **FastAPI** 👆 ✔️ 🔆 💪 🚚 Pydantic 🏷, ⏪ 🚧 👆 📟 🙅, 📏 & 😍. ✋️ ⏮️ 🌐 💰: * 👨🎨 🐕🦺 (🛠️ 🌐 ❗) * 💽 🛠️ (.Ⓜ.. ✍ / 🛠️)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.1K bytes - Viewed (0) -
docs/ru/docs/tutorial/body-nested-models.md
Это значит, что даже если пользователи вашего API могут отправлять только строки в качестве ключей, при условии, что эти строки содержат целые числа, Pydantic автоматический преобразует и валидирует эти данные. А `dict`, с именем `weights`, который вы получите в качестве ответа Pydantic, действительно будет иметь ключи типа `int` и значения типа `float`. /// ## Резюме
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 14.8K bytes - Viewed (0) -
docs/ko/docs/tutorial/body-nested-models.md
``` /// tip | "팁" JSON은 오직 `str`형 키만 지원한다는 것을 염두에 두세요. 하지만 Pydantic은 자동 데이터 변환이 있습니다. 즉, API 클라이언트가 문자열을 키로 보내더라도 해당 문자열이 순수한 정수를 포함하는한 Pydantic은 이를 변환하고 검증합니다. 그러므로 `weights`로 받은 `dict`는 실제로 `int` 키와 `float` 값을 가집니다. /// ## 요약 **FastAPI**를 사용하면 Pydantic 모델이 제공하는 최대 유연성을 확보하면서 코드를 간단하고 짧게, 그리고 우아하게 유지할 수 있습니다. 물론 아래의 이점도 있습니다: * 편집기 지원 (자동완성이 어디서나!)
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/en/docs/tutorial/body-nested-models.md
This means that, even though your API clients can only send strings as keys, as long as those strings contain pure integers, Pydantic will convert them and validate them. And the `dict` you receive as `weights` will actually have `int` keys and `float` values. /// ## Recap With **FastAPI** you have the maximum flexibility provided by Pydantic models, while keeping your code simple, short and elegant.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.4K bytes - Viewed (0) -
docs/zh/docs/tutorial/body-nested-models.md
``` //// /// tip 请记住 JSON 仅支持将 `str` 作为键。 但是 Pydantic 具有自动转换数据的功能。 这意味着,即使你的 API 客户端只能将字符串作为键发送,只要这些字符串内容仅包含整数,Pydantic 就会对其进行转换并校验。 然后你接收的名为 `weights` 的 `dict` 实际上将具有 `int` 类型的键和 `float` 类型的值。 /// ## 总结 使用 **FastAPI** 你可以拥有 Pydantic 模型提供的极高灵活性,同时保持代码的简单、简短和优雅。 而且还具有下列好处: * 编辑器支持(处处皆可自动补全!) * 数据转换(也被称为解析/序列化) * 数据校验 * 模式文档
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java
// but work beyond that must take at least one second assertTrue(afterBurst >= 1000); } } /** * This neat test shows that no matter what weights we use in our requests, if we push X amount of * permits in a cool state, where X = rate * timeToCoolDown, and we have specified a * timeToWarmUp() period, it will cost as the prescribed amount of time. E.g., calling
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 21.8K bytes - Viewed (0)