- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 65 for fake (0.24 sec)
-
docs/ru/docs/tutorial/encoder.md
Например, если необходимо хранить его в базе данных. Для этого **FastAPI** предоставляет функцию `jsonable_encoder()`. ## Использование `jsonable_encoder` Представим, что у вас есть база данных `fake_db`, которая принимает только JSON-совместимые данные. Например, он не принимает объекты `datetime`, так как они не совместимы с JSON.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 23 13:56:12 GMT 2024 - 2.8K bytes - Viewed (0) -
docs/uk/docs/tutorial/encoder.md
Наприклад, якщо вам потрібно зберегти це в базі даних. Для цього, **FastAPI** надає `jsonable_encoder()` функцію. ## Використання `jsonable_encoder` Давайте уявимо, що у вас є база даних `fake_db`, яка приймає лише дані, сумісні з JSON. Наприклад, вона не приймає об'єкти типу `datetime`, оскільки вони не сумісні з JSON.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 2.6K bytes - Viewed (0) -
docs/en/docs/tutorial/security/get-current-user.md
The security and dependency injection stuff is written once. And you can make it as complex as you want. And still, have it written only once, in a single place. With all the flexibility. But you can have thousands of endpoints (*path operations*) using the same security system. And all of them (or any portion of them that you want) can take the advantage of re-using these dependencies or any other dependencies you create.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 7.6K bytes - Viewed (0) -
docs/en/docs/tutorial/security/oauth2-jwt.md
```Python hl_lines="7 48 55-56 59-60 69-75" {!> ../../../docs_src/security/tutorial004.py!} ``` !!! note If you check the new (fake) database `fake_users_db`, you will see how the hashed password looks like now: `"$2b$12$EixZaYVK1fsbw1ZfbX3OXePaWxn96p36WQoeG6Lruj3vjPGga31lW"`. ## Handle JWT tokens Import the modules installed.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 13K bytes - Viewed (0) -
docs/en/docs/tutorial/encoder.md
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. For example, it doesn't receive `datetime` objects, as those are not compatible with JSON.
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/de/docs/advanced/events.md
```Python hl_lines="16 19" {!../../../docs_src/events/tutorial003.py!} ``` Hier simulieren wir das langsame *Hochfahren*, das Laden des Modells, indem wir die (Fake-)Modellfunktion vor dem `yield` in das Dictionary mit Modellen für maschinelles Lernen einfügen. Dieser Code wird ausgeführt, **bevor** die Anwendung **beginnt, Requests entgegenzunehmen**, während des *Hochfahrens*.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:30:59 GMT 2024 - 9.1K bytes - Viewed (0) -
docs/em/docs/tutorial/encoder.md
# 🎻 🔗 🔢 📤 💼 🌐❔ 👆 5️⃣📆 💪 🗜 💽 🆎 (💖 Pydantic 🏷) 🕳 🔗 ⏮️ 🎻 (💖 `dict`, `list`, ♒️). 🖼, 🚥 👆 💪 🏪 ⚫️ 💽. 👈, **FastAPI** 🚚 `jsonable_encoder()` 🔢. ## ⚙️ `jsonable_encoder` ➡️ 🌈 👈 👆 ✔️ 💽 `fake_db` 👈 🕴 📨 🎻 🔗 💽. 🖼, ⚫️ 🚫 📨 `datetime` 🎚, 👈 🚫 🔗 ⏮️ 🎻. , `datetime` 🎚 🔜 ✔️ 🗜 `str` ⚗ 💽 <a href="https://en.wikipedia.org/wiki/ISO_8601" class="external-link" target="_blank">💾 📁</a>.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 1.5K bytes - Viewed (0) -
docs/pt/docs/tutorial/encoder.md
Por exemplo, se você precisar armazená-lo em um banco de dados. Para isso, **FastAPI** fornece uma função `jsonable_encoder()`. ## Usando a função `jsonable_encoder` Vamos imaginar que você tenha um banco de dados `fake_db` que recebe apenas dados compatíveis com JSON. Por exemplo, ele não recebe objetos `datetime`, pois estes objetos não são compatíveis com JSON.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 1.9K bytes - Viewed (0) -
docs/en/docs/tutorial/security/simple-oauth2.md
We are not using `scopes` in this example, but the functionality is there if you need it. Now, get the user data from the (fake) database, using the `username` from the form field. If there is no such user, we return an error saying "Incorrect username or password". For the error, we use the exception `HTTPException`: === "Python 3.10+"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 12.5K bytes - Viewed (0)