Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 55 for Optional (5.14 sec)

  1. docs/em/docs/python-types.md

    🐍 3️⃣.6️⃣ & 🔛 (✅ 🐍 3️⃣.1️⃣0️⃣) 👆 💪 📣 ⚫️ 🏭 & ⚙️ `Optional` ⚪️➡️ `typing` 🕹.
    
    ```Python hl_lines="1  4"
    {!../../../docs_src/python_types/tutorial009.py!}
    ```
    
    ⚙️ `Optional[str]` ↩️ `str` 🔜 ➡️ 👨‍🎨 ℹ 👆 🔍 ❌ 🌐❔ 👆 💪 🤔 👈 💲 🕧 `str`, 🕐❔ ⚫️ 💪 🤙 `None` 💁‍♂️.
    
    `Optional[Something]` 🤙 ⌨ `Union[Something, None]`, 👫 🌓.
    
    👉 ⛓ 👈 🐍 3️⃣.1️⃣0️⃣, 👆 💪 ⚙️ `Something | None`:
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  2. docs/en/docs/python-types.md

        ```
    
    #### Using `Union` or `Optional`
    
    If you are using a Python version below 3.10, here's a tip from my very **subjective** point of view:
    
    * 🚨 Avoid using `Optional[SomeType]`
    * Instead ✨ **use `Union[SomeType, None]`** ✨.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17K bytes
    - Viewed (0)
  3. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KtFirDataFlowInfoProvider.kt

                        mapping.computeIfAbsent(element) { _ ->
                            unmappedCount -= 1
                            // Here we intentionally use the 'Optional' wrapper to make 'computeIfAbsent' work smoothly
                            Optional.ofNullable(computeTarget(element))
                        }
                    }
    
                    if (unmappedCount > 0) {
                        element.acceptChildren(this)
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Tue Apr 16 06:40:43 GMT 2024
    - 22.9K bytes
    - Viewed (0)
  4. docs/vi/docs/python-types.md

    ```Python hl_lines="1  4"
    {!../../../docs_src/python_types/tutorial009.py!}
    ```
    
    Sử dụng `Optional[str]` thay cho `str` sẽ cho phép trình soạn thảo giúp bạn phát hiện các lỗi mà bạn có thể gặp như một giá trị luôn là một `str`, trong khi thực tế nó rất có thể là `None`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  5. docs/ja/docs/tutorial/body.md

    * パラメータが **Pydantic モデル**型で宣言された場合、リクエスト**ボディ**として解釈されます。
    
    !!! note "備考"
        FastAPIは、`= None`があるおかげで、`q`がオプショナルだとわかります。
    
        `Optional[str]` の`Optional` はFastAPIでは使用されていません(FastAPIは`str`の部分のみ使用します)。しかし、`Optional[str]` はエディタがコードのエラーを見つけるのを助けてくれます。
    
    ## Pydanticを使わない方法
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/security/simple-oauth2.md

        ```
    
    `OAuth2PasswordRequestForm` is a class dependency that declares a form body with:
    
    * The `username`.
    * The `password`.
    * An optional `scope` field as a big string, composed of strings separated by spaces.
    * An optional `grant_type`.
    
    !!! tip
        The OAuth2 spec actually *requires* a field `grant_type` with a fixed value of `password`, but `OAuth2PasswordRequestForm` doesn't enforce it.
    
    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)
  7. docs/metrics/prometheus/README.md

      scheme: http
      static_configs:
      - targets: ['localhost:9000']
    ```
    
    ##### Node centric (optional)
    
    ```yaml
    - job_name: minio-job-node
      bearer_token: <secret>
      metrics_path: /minio/v2/metrics/node
      scheme: http
      static_configs:
      - targets: ['localhost:9000']
    ```
    
    ##### Resource centric (optional)
    
    ```yaml
    - job_name: minio-job-resource
      bearer_token: <secret>
    Plain Text
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 12 15:49:30 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  8. docs/uk/docs/python-types.md

    #### Possibly `None` (Optional)
    
    Ви можете оголосити, що значення може мати тип, наприклад `str`, але також може бути `None`.
    
    У Python 3.6 і вище (включаючи Python 3.10) ви можете оголосити його, імпортувавши та використовуючи `Optional` з модуля `typing`.
    
    ```Python hl_lines="1  4"
    {!../../../docs_src/python_types/tutorial009.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  9. pyproject.toml

        ]
    
    [tool.tiangolo._internal-slim-build.packages.fastapi-slim.project]
    name = "fastapi-slim"
    
    [tool.tiangolo._internal-slim-build.packages.fastapi]
    include-optional-dependencies = ["standard"]
    
    [tool.tiangolo._internal-slim-build.packages.fastapi.project.optional-dependencies]
    all = [
        # # For the test client
        "httpx >=0.23.0",
        # For templates
        "jinja2 >=2.11.2",
        # For forms and file uploads
    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)
  10. docs/zh/docs/tutorial/body.md

    - 类型是(`int`、`float`、`str`、`bool` 等)**单类型**的参数,是**查询**参数
    - 类型是 **Pydantic 模型**的参数,是**请求体**
    
    !!! note "笔记"
    
        因为默认值是 `None`, FastAPI 会把 `q` 当作可选参数。
    
        FastAPI 不使用 `Optional[str]` 中的 `Optional`, 但 `Optional` 可以让编辑器提供更好的支持,并检测错误。
    
    ## 不使用 Pydantic
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.5K bytes
    - Viewed (0)
Back to top