- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 35 for computed (0.21 sec)
-
tests/test_computed_fields.py
from .utils import needs_pydanticv2 @pytest.fixture(name="client") def get_client(): app = FastAPI() from pydantic import BaseModel, computed_field class Rectangle(BaseModel): width: int length: int @computed_field @property def area(self) -> int: return self.width * self.length @app.get("/") def read_root() -> Rectangle:
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Aug 04 20:47:07 GMT 2023 - 2.2K bytes - Viewed (0) -
docs/em/docs/tutorial/dependencies/sub-dependencies.md
``` ## ⚙️ 🎏 🔗 💗 🕰 🚥 1️⃣ 👆 🔗 📣 💗 🕰 🎏 *➡ 🛠️*, 🖼, 💗 🔗 ✔️ ⚠ 🎧-🔗, **FastAPI** 🔜 💭 🤙 👈 🎧-🔗 🕴 🕐 📍 📨. & ⚫️ 🔜 🖊 📨 💲 <abbr title="A utility/system to store computed/generated values, to re-use them instead of computing them again.">"💾"</abbr> & 🚶♀️ ⚫️ 🌐 "⚓️" 👈 💪 ⚫️ 👈 🎯 📨, ↩️ 🤙 🔗 💗 🕰 🎏 📨.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 3.3K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/sub-dependencies.md
And it will save the returned value in a <abbr title="A utility/system to store computed/generated values, to re-use them instead of computing them again.">"cache"</abbr> and pass it to all the "dependants" that need it in that specific request, instead of calling the dependency multiple times for the same request.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 5.6K bytes - Viewed (0) -
docs/en/docs/deployment/concepts.md
* Each application that you have running on your computer has some process behind it, each running program, each window, etc. And there are normally many processes running **at the same time** while a computer is on. * There can be **multiple processes** of the **same program** running at the same time.
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 18K bytes - Viewed (0) -
docs/en/docs/how-to/async-sql-encode-databases.md
### About `{**note.dict(), "id": last_record_id}` `note` is a Pydantic `Note` object. `note.dict()` returns a `dict` with its data, something like: ```Python { "text": "Some note", "completed": False, } ``` but it doesn't have the `id` field. So we create a new `dict`, that contains the key-value pairs from `note.dict()` with: ```Python {**note.dict()} ```
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 5.3K bytes - Viewed (0) -
docs/de/docs/advanced/behind-a-proxy.md
server["Server auf http://127.0.0.1:8000/app"] browser --> proxy proxy --> server ``` !!! tip "Tipp" Die IP `0.0.0.0` wird üblicherweise verwendet, um anzudeuten, dass das Programm alle auf diesem Computer/Server verfügbaren IPs abhört. Die Benutzeroberfläche der Dokumentation würde benötigen, dass das OpenAPI-Schema deklariert, dass sich dieser API-`server` unter `/api/v1` (hinter dem Proxy) befindet. Zum Beispiel:
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 30 20:30:07 GMT 2024 - 13.1K bytes - Viewed (0) -
docs/en/docs/release-notes.md
## 0.101.0 ### Features * ✨ Enable Pydantic's serialization mode for responses, add support for Pydantic's `computed_field`, better OpenAPI for response models, proper required attributes, better generated clients. PR [#10011](https://github.com/tiangolo/fastapi/pull/10011) by [@tiangolo](https://github.com/tiangolo). ### Refactors
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Apr 28 00:28:00 GMT 2024 - 385.5K bytes - Viewed (1) -
tests/test_modules_same_name_body/test_main.py
}, "summary": "Compute", "operationId": "compute_a_compute_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Body_compute_a_compute_post" }
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 5.6K bytes - Viewed (0) -
tests/test_tutorial/test_async_sql_databases/test_tutorial001.py
with TestClient(app) as client: note = {"text": "Foo bar", "completed": False} response = client.post("/notes/", json=note) assert response.status_code == 200, response.text data = response.json() assert data["text"] == note["text"] assert data["completed"] == note["completed"] assert "id" in data response = client.get("/notes/")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Oct 18 12:36:40 GMT 2023 - 6K bytes - Viewed (0) -
docs/zh/docs/advanced/async-sql-databases.md
### 关于 `{**note.dict(), "id": last_record_id}` `note` 是 Pydantic `Note` 对象: `note.dict()` 返回包含如下数据的**字典**: ```Python { "text": "Some note", "completed": False, } ``` 但它不包含 `id` 字段。 因此要新建一个包含 `note.dict()` 键值对的**字典**: ```Python {**note.dict()} ``` `**note.dict()` 直接**解包**键值对, 因此,`{**note.dict()}` 是 `note.dict()` 的副本。
Plain Text - Registered: Sun Mar 31 07:19:09 GMT 2024 - Last Modified: Sat Mar 30 22:44:40 GMT 2024 - 4.3K bytes - Viewed (0)