- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 14 for fake_save_user (0.24 seconds)
-
docs_src/extra_models/tutorial002_py310.py
def fake_save_user(user_in: UserIn): hashed_password = fake_password_hasher(user_in.password) user_in_db = UserInDB(**user_in.model_dump(), hashed_password=hashed_password) print("User saved! ..not really") return user_in_db @app.post("/user/", response_model=UserOut) async def create_user(user_in: UserIn): user_saved = fake_save_user(user_in)Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 798 bytes - Click Count (0) -
docs_src/extra_models/tutorial001_py310.py
def fake_save_user(user_in: UserIn): hashed_password = fake_password_hasher(user_in.password) user_in_db = UserInDB(**user_in.model_dump(), hashed_password=hashed_password) print("User saved! ..not really") return user_in_db @app.post("/user/", response_model=UserOut) async def create_user(user_in: UserIn): user_saved = fake_save_user(user_in)Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 905 bytes - Click Count (0) -
docs/en/docs/tutorial/extra-models.md
email = user_dict["email"], full_name = user_dict["full_name"], hashed_password = hashed_password, ) ``` /// warning The supporting additional functions `fake_password_hasher` and `fake_save_user` are just to demo a possible flow of the data, but they of course are not providing any real security. /// ## Reduce duplication { #reduce-duplication }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 6.7K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/extra-models.md
email = user_dict["email"], full_name = user_dict["full_name"], hashed_password = hashed_password, ) ``` /// warning 輔助函式 `fake_password_hasher` 與 `fake_save_user` 只是用來示範資料流程,並不提供任何實際的安全性。 /// ## 減少重複 { #reduce-duplication } 減少程式碼重複是 FastAPI 的核心理念之一。 因為重複的程式碼會提高發生錯誤、安全性問題、程式不同步(某處更新但其他處未更新)等風險。 而這些模型共享大量資料,重複了屬性名稱與型別。 我們可以做得更好。
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 6.3K bytes - Click Count (0) -
docs/uk/docs/tutorial/extra-models.md
email = user_dict["email"], full_name = user_dict["full_name"], hashed_password = hashed_password, ) ``` /// warning | Попередження Додаткові допоміжні функції `fake_password_hasher` і `fake_save_user` лише демонструють можливий потік даних і, звісно, не забезпечують реальної безпеки. /// ## Зменшення дублювання { #reduce-duplication } Зменшення дублювання коду - одна з ключових ідей у **FastAPI**.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 9.4K bytes - Click Count (0) -
docs/es/docs/tutorial/extra-models.md
full_name = user_dict["full_name"], hashed_password = hashed_password, ) ``` /// warning | Advertencia Las funciones adicionales de soporte `fake_password_hasher` y `fake_save_user` son solo para demostrar un posible flujo de datos, pero por supuesto no proporcionan ninguna seguridad real. /// ## Reducir duplicación { #reduce-duplication }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 7.2K bytes - Click Count (0) -
docs/fr/docs/tutorial/extra-models.md
email = user_dict["email"], full_name = user_dict["full_name"], hashed_password = hashed_password, ) ``` /// warning | Alertes Les fonctions auxiliaires `fake_password_hasher` et `fake_save_user` ne servent qu'à démontrer un flux de données possible, mais elles n'offrent évidemment aucune sécurité réelle. /// ## Réduire la duplication { #reduce-duplication }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 7.6K bytes - Click Count (0) -
docs/zh/docs/tutorial/extra-models.md
email = user_dict["email"], full_name = user_dict["full_name"], hashed_password = hashed_password, ) ``` /// warning | 警告 配套的辅助函数 `fake_password_hasher` 和 `fake_save_user` 仅用于演示可能的数据流,当然并不提供真实的安全性。 /// ## 减少重复 { #reduce-duplication } 减少代码重复是 **FastAPI** 的核心思想之一。 代码重复会导致 bug、安全问题、代码失步等问题(更新了某个位置的代码,但没有同步更新其它位置的代码)。 上面的这些模型共享了大量数据,拥有重复的属性名和类型。
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 6.5K bytes - Click Count (0) -
docs/tr/docs/tutorial/extra-models.md
email = user_dict["email"], full_name = user_dict["full_name"], hashed_password = hashed_password, ) ``` /// warning | Uyarı Ek destek fonksiyonları olan `fake_password_hasher` ve `fake_save_user` sadece verinin olası bir akışını göstermek içindir; elbette gerçek bir güvenlik sağlamazlar. /// ## Tekrarı Azaltma { #reduce-duplication }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 7.4K bytes - Click Count (0) -
docs/ru/docs/tutorial/extra-models.md
full_name = user_dict["full_name"], hashed_password = hashed_password, ) ``` /// warning | Предупреждение Вспомогательные дополнительные функции `fake_password_hasher` и `fake_save_user` используются только для демонстрации возможного потока данных и, конечно, не обеспечивают настоящую безопасность. /// ## Сократите дублирование { #reduce-duplication }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 10.7K bytes - Click Count (0)