Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 191 - 200 of 1,039 for Python (0.05 seconds)

  1. docs/es/docs/deployment/manually.md

    ```
    
    </div>
    
    /// note | Nota
    
    El comando `uvicorn main:app` se refiere a:
    
    * `main`: el archivo `main.py` (el "módulo" de Python).
    * `app`: el objeto creado dentro de `main.py` con la línea `app = FastAPI()`.
    
    Es equivalente a:
    
    ```Python
    from main import app
    ```
    
    ///
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 7K bytes
    - Click Count (0)
  2. docs/en/docs/reference/exceptions.md

    When you raise an exception, as would happen with normal Python, the rest of the execution is aborted. This way you can raise these exceptions from anywhere in the code to abort a request and show the error to the client.
    
    You can use:
    
    * `HTTPException`
    * `WebSocketException`
    
    These exceptions can be imported directly from `fastapi`:
    
    ```python
    from fastapi import HTTPException, WebSocketException
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 597 bytes
    - Click Count (0)
  3. docs/ja/docs/async.md

    ここでの鍵は `await` です。`burgers` に結果を保存する前に、`get_burgers(2)` がやるべきことを終えるのを ⏸ 待つ 🕙 ように Python に伝えます。これにより Python は、その間に (別のリクエストを受け取るなど) ほかのことを 🔀 ⏯ できると分かります。
    
    `await` が機能するには、この非同期性をサポートする関数の内部でなければなりません。そのためには `async def` で宣言します:
    
    ```Python hl_lines="1"
    async def get_burgers(number: int):
        # ハンバーガーを作るために非同期の処理を行う
        return burgers
    ```
    
    ...`def` の代わりに:
    
    ```Python hl_lines="2"
    # これは非同期ではない
    def get_sequential_burgers(number: int):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 27.9K bytes
    - Click Count (0)
  4. docs/ja/docs/tutorial/body-nested-models.md

    角括弧(`[`と`]`)を使って内部の型を「タイプパラメータ」として渡します。
    
    ```Python
    my_list: list[str]
    ```
    
    型宣言の標準的なPythonの構文はこれだけです。
    
    内部の型を持つモデルの属性にも同じ標準の構文を使用してください。
    
    そのため、以下の例では`tags`を具体的な「文字列のリスト」にすることができます:
    
    {* ../../docs_src/body_nested_models/tutorial002_py310.py hl[12] *}
    
    ## セット型 { #set-types }
    
    しかし、よく考えてみると、タグは繰り返すべきではなく、おそらくユニークな文字列になるのではないかと気付いたとします。
    
    そして、Pythonにはユニークな項目のセットのための特別なデータ型`set`があります。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 8.6K bytes
    - Click Count (0)
  5. tensorflow/api_template_v1.__init__.py

    # pylint: disable=g-bad-import-order,protected-access,g-import-not-at-top
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
    from tensorflow.python.tools import module_util as _module_util
    from tensorflow.python.platform import tf_logging as _logging
    from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader
    from tensorflow.python.util.lazy_loader import KerasLazyLoader as _KerasLazyLoader
    
    # API IMPORTS PLACEHOLDER
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Wed Oct 02 22:16:02 GMT 2024
    - 7.5K bytes
    - Click Count (0)
  6. docs/zh/docs/tutorial/body-nested-models.md

    ```Python
    my_list: list[str]
    ```
    
    这完全是用于类型声明的标准 Python 语法。
    
    对具有内部类型的模型属性也使用相同的标准语法。
    
    因此,在我们的示例中,我们可以将 `tags` 明确地指定为一个「字符串列表」:
    
    {* ../../docs_src/body_nested_models/tutorial002_py310.py hl[12] *}
    
    ## Set 类型 { #set-types }
    
    但是随后我们考虑了一下,意识到标签不应该重复,它们很大可能会是唯一的字符串。
    
    而 Python 有一种用于保存唯一元素集合的特殊数据类型 `set`。
    
    然后我们可以将 `tags` 声明为一个由字符串组成的 set:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 6.8K bytes
    - Click Count (0)
  7. docs/en/docs/tutorial/body.md

    Use standard Python types for all the attributes:
    
    {* ../../docs_src/body/tutorial001_py310.py hl[5:9] *}
    
    
    The same as when declaring query parameters, when a model attribute has a default value, it is not required. Otherwise, it is required. Use `None` to make it just optional.
    
    For example, this model above declares a JSON "`object`" (or Python `dict`) like:
    
    ```JSON
    {
        "name": "Foo",
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 6.5K bytes
    - Click Count (0)
  8. docs/en/mkdocs.yml

          advanced/extending-openapi.md: how-to/extending-openapi.md
          advanced/testing-database.md: how-to/testing-database.md
      mkdocstrings:
        handlers:
          python:
            options:
              extensions:
              - griffe_typingdoc
              show_root_heading: true
              show_if_no_docstring: true
              preload_modules:
              - httpx
              - starlette
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Apr 01 16:16:24 GMT 2026
    - 9.9K bytes
    - Click Count (0)
  9. docs/en/docs/advanced/events.md

    A **context manager** in Python is something that you can use in a `with` statement, for example, `open()` can be used as a context manager:
    
    ```Python
    with open("file.txt") as file:
        file.read()
    ```
    
    In recent versions of Python, there's also an **async context manager**. You would use it with `async with`:
    
    ```Python
    async with lifespan(app):
        await do_stuff()
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 7.8K bytes
    - Click Count (0)
  10. docs/ja/docs/tutorial/request-forms.md

    # フォームデータ { #form-data }
    
    JSONの代わりにフィールドを受け取る場合は、`Form`を使用します。
    
    /// info | 情報
    
    フォームを使うためには、まず[`python-multipart`](https://github.com/Kludex/python-multipart)をインストールします。
    
    必ず[仮想環境](../virtual-environments.md)を作成して有効化してから、例えば次のようにインストールしてください:
    
    ```console
    $ pip install python-multipart
    ```
    
    ///
    
    ## `Form`のインポート { #import-form }
    
    `fastapi`から`Form`をインポートします:
    
    {* ../../docs_src/request_forms/tutorial001_an_py310.py hl[3] *}
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 3.5K bytes
    - Click Count (0)
Back to Top