- Sort Score
- Num 10 results
- Language All
Results 161 - 170 of 1,062 for python (0.08 seconds)
-
docs/en/docs/tutorial/encoder.md
The result of calling it is something that can be encoded with the Python standard [`json.dumps()`](https://docs.python.org/3/library/json.html#json.dumps). It doesn't return a large `str` containing the data in JSON format (as a string). It returns a Python standard data structure (e.g. a `dict`) with values and sub-values that are all compatible with JSON. /// note
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 1.6K bytes - Click Count (0) -
docs/zh/docs/advanced/settings.md
end ``` 在我们的依赖项 `get_settings()` 的情况下,该函数甚至不接受任何参数,因此它始终返回相同的值。 这样,它的行为几乎就像是一个全局变量。但由于它使用了依赖项函数,我们可以在测试时很容易地覆盖它。 `@lru_cache` 是 `functools` 的一部分,它属于 Python 标准库。你可以在 [Python 文档中关于 `@lru_cache` 的章节](https://docs.python.org/3/library/functools.html#functools.lru_cache)阅读更多信息。 ## 小结 { #recap } 你可以使用 Pydantic Settings 来处理应用的设置或配置,享受 Pydantic 模型的全部能力。 - 通过使用依赖项,你可以简化测试。 - 你可以与它一起使用 `.env` 文件。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 10.4K bytes - Click Count (0) -
docs/zh/docs/tutorial/header-params.md
## 自动转换 { #automatic-conversion } `Header` 比 `Path`、`Query` 和 `Cookie` 提供了更多功能。 大部分标准请求头用**连字符**分隔,即**减号**(`-`)。 但是 `user-agent` 这样的变量在 Python 中是无效的。 因此,默认情况下,`Header` 把参数名中的字符由下划线(`_`)改为连字符(`-`)来提取并存档请求头 。 同时,HTTP 的请求头不区分大小写,可以使用 Python 标准样式(即 **snake_case**)进行声明。 因此,可以像在 Python 代码中一样使用 `user_agent` ,无需把首字母大写为 `User_Agent` 等形式。 如需禁用下划线自动转换为连字符,可以把 `Header` 的 `convert_underscores` 参数设置为 `False`:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:39:41 GMT 2026 - 2.6K bytes - Click Count (0) -
docs/zh/docs/tutorial/request-form-models.md
# 表单模型 { #form-models } 你可以在 FastAPI 中使用 **Pydantic 模型**声明**表单字段**。 /// info | 信息 要使用表单,首先安装 [`python-multipart`](https://github.com/Kludex/python-multipart)。 确保你创建一个[虚拟环境](../virtual-environments.md),激活它,然后再安装,例如: ```console $ pip install python-multipart ``` /// /// note | 注意 自 FastAPI 版本 `0.113.0` 起支持此功能。🤓 /// ## 表单的 Pydantic 模型 { #pydantic-models-for-forms }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 2.1K bytes - Click Count (0) -
docs/en/docs/tutorial/body-nested-models.md
## List fields { #list-fields } You can define an attribute to be a subtype. For example, a Python `list`: {* ../../docs_src/body_nested_models/tutorial001_py310.py hl[12] *} This will make `tags` be a list, although it doesn't declare the type of the elements of the list. ## List fields with type parameter { #list-fields-with-type-parameter } But Python has a specific way to declare lists with internal types, or "type parameters":Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 6.6K bytes - Click Count (0) -
docs/zh/docs/tutorial/request-forms-and-files.md
# 请求表单与文件 { #request-forms-and-files } FastAPI 支持同时使用 `File` 和 `Form` 定义文件和表单字段。 /// info | 信息 接收上传的文件和/或表单数据,首先安装 [`python-multipart`](https://github.com/Kludex/python-multipart)。 请先创建并激活一个[虚拟环境](../virtual-environments.md),然后再安装,例如: ```console $ pip install python-multipart ``` /// ## 导入 `File` 与 `Form` { #import-file-and-form } {* ../../docs_src/request_forms_and_files/tutorial001_an_py310.py hl[3] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 1.3K bytes - Click Count (0) -
docs/sts/.gitignore
__pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ *.egg-info/ .installed.cfg *.egg MANIFEST # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it.
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Wed Jul 15 11:55:55 GMT 2020 - 1.2K bytes - Click Count (0) -
docs/en/docs/async.md
## `async` and `await` { #async-and-await } Modern versions of Python have a very intuitive way to define asynchronous code. This makes it look just like normal "sequential" code and do the "awaiting" for you at the right moments. When there is an operation that will require waiting before giving the results and has support for these new Python features, you can code it like: ```Python burgers = await get_burgers(2) ```Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 23.4K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/settings.md
end ``` 在我們的相依 `get_settings()` 這個案例中,該函式甚至不帶任何參數,因此它總是回傳相同的值。 如此一來,它的行為幾乎就像全域變數。但因為它使用相依函式,因此我們可以在測試時輕鬆將其覆寫。 `@lru_cache` 是 `functools` 的一部分,而 `functools` 是 Python 標準程式庫的一部分。你可以在[Python 文件中閱讀 `@lru_cache`](https://docs.python.org/3/library/functools.html#functools.lru_cache) 以了解更多。 ## 回顧 { #recap } 你可以使用 Pydantic Settings 來處理應用程式的設定或組態,並享有 Pydantic model 的全部能力。 - 透過相依可以讓測試更容易。 - 你可以搭配 `.env` 檔使用。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 10.3K bytes - Click Count (0) -
README.md
commands above. *Nightly binaries are available for testing using the [tf-nightly](https://pypi.python.org/pypi/tf-nightly) and [tf-nightly-cpu](https://pypi.python.org/pypi/tf-nightly-cpu) packages on PyPI.* #### *Try your first TensorFlow program* ```shell $ python ``` ```python >>> import tensorflow as tf >>> tf.add(1, 2).numpy() 3 >>> hello = tf.constant('Hello, TensorFlow!')
Created: Tue Apr 07 12:39:13 GMT 2026 - Last Modified: Thu Apr 02 10:38:57 GMT 2026 - 11.6K bytes - Click Count (0)