- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 109 for listo (0.12 sec)
-
docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md
For those cases, instead of declaring a *path operation function* parameter with `Depends`, you can add a `list` of `dependencies` to the *path operation decorator*. ## Add `dependencies` to the *path operation decorator* The *path operation decorator* receives an optional argument `dependencies`. It should be a `list` of `Depends()`: === "Python 3.9+" ```Python hl_lines="19"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 4.1K bytes - Viewed (0) -
docs_src/websockets/tutorial003_py39.py
event.preventDefault() } </script> </body> </html> """ class ConnectionManager: def __init__(self): self.active_connections: list[WebSocket] = [] async def connect(self, websocket: WebSocket): await websocket.accept() self.active_connections.append(websocket) def disconnect(self, websocket: WebSocket):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 2.5K bytes - Viewed (0) -
docs/en/docs/tutorial/encoder.md
# JSON Compatible Encoder There are some cases where you might need to convert a data type (like a Pydantic model) to something compatible with JSON (like a `dict`, `list`, etc). For example, if you need to store it in a database. For that, **FastAPI** provides a `jsonable_encoder()` function. ## Using the `jsonable_encoder` Let's imagine that you have a database `fake_db` that only receives JSON compatible data.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 1.8K bytes - Viewed (0) -
docs/zh/docs/tutorial/encoder.md
# JSON 兼容编码器 在某些情况下,您可能需要将数据类型(如Pydantic模型)转换为与JSON兼容的数据类型(如`dict`、`list`等)。 比如,如果您需要将其存储在数据库中。 对于这种要求, **FastAPI**提供了`jsonable_encoder()`函数。 ## 使用`jsonable_encoder` 让我们假设你有一个数据库名为`fake_db`,它只能接收与JSON兼容的数据。 例如,它不接收`datetime`这类的对象,因为这些对象与JSON不兼容。 因此,`datetime`对象必须将转换为包含<a href="https://en.wikipedia.org/wiki/ISO_8601" class="external-link" target="_blank">ISO格式化</a>的`str`类型对象。 同样,这个数据库也不会接收Pydantic模型(带有属性的对象),而只接收`dict`。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 1.7K bytes - Viewed (0) -
docs/ja/docs/tutorial/encoder.md
# JSON互換エンコーダ データ型(Pydanticモデルのような)をJSONと互換性のあるもの(`dict`や`list`など)に変更する必要がある場合があります。 例えば、データベースに保存する必要がある場合です。 そのために、**FastAPI** は`jsonable_encoder()`関数を提供しています。 ## `jsonable_encoder`の使用 JSON互換のデータのみを受信するデータベース`fase_db`があるとしましょう。 例えば、`datetime`オブジェクトはJSONと互換性がないので、このデーターベースには受け取られません。 そのため、`datetime`オブジェクトは<a href="https://en.wikipedia.org/wiki/ISO_8601" class="external-link" target="_blank">ISO形式</a>のデータを含む`str`に変換されなければなりません。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Jan 22 20:09:02 GMT 2024 - 1.9K bytes - Viewed (0) -
docs/ru/docs/tutorial/extra-models.md
## Список моделей Таким же образом вы можете определять ответы как списки объектов. Для этого используйте `typing.List` из стандартной библиотеки Python (или просто `list` в Python 3.9 и выше): === "Python 3.9+" ```Python hl_lines="18" {!> ../../../docs_src/extra_models/tutorial004_py39.py!} ``` === "Python 3.8+"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 11.6K bytes - Viewed (0) -
docs/ru/docs/tutorial/extra-data-types.md
* `frozenset`: * В запросах и ответах обрабатывается так же, как и `set`: * В запросах будет прочитан список, исключены дубликаты и преобразован в `set`. * В ответах `set` будет преобразован в `list`. * В сгенерированной схеме будет указано, что значения `set` уникальны (с помощью JSON-схемы `uniqueItems`). * `bytes`: * Встроенный в Python `bytes`. * В запросах и ответах будет рассматриваться как `str`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 4.7K bytes - Viewed (0) -
docs/en/docs/features.md
But by default, it all **"just works"**. ### Validation * Validation for most (or all?) Python **data types**, including: * JSON objects (`dict`). * JSON array (`list`) defining item types. * String (`str`) fields, defining min and max lengths. * Numbers (`int`, `float`) with min and max values, etc. * Validation for more exotic types, like: * URL. * Email.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 9.3K bytes - Viewed (0) -
docs/pt/docs/features.md
Por padrão, tudo **"simplesmente funciona"**. ### Validação * Validação para a maioria dos (ou todos?) **tipos de dados** do Python, incluindo: * objetos JSON (`dict`). * arrays JSON (`list`), definindo tipos dos itens. * campos String (`str`), definindo tamanho mínimo e máximo. * Numbers (`int`, `float`) com valores mínimos e máximos, etc. * Validação de tipos mais exóticos, como: * URL.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 10.4K bytes - Viewed (0) -
docs/ru/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md
## Добавление `dependencies` в *декоратор операции пути* *Декоратор операции пути* получает необязательный аргумент `dependencies`. Это должен быть `list` состоящий из `Depends()`: === "Python 3.9+" ```Python hl_lines="19" {!> ../../../docs_src/dependencies/tutorial006_an_py39.py!} ``` === "Python 3.8+" ```Python hl_lines="18"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Apr 06 15:43:55 GMT 2024 - 6.5K bytes - Viewed (0)