Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 171 - 180 of 1,681 for tone (0.03 seconds)

  1. docs/zh-hant/docs/tutorial/query-params-str-validations.md

    在這種情況下(未使用 `Annotated`),我們必須用 `Query()` 取代函式中的預設值 `None`,因此需要用 `Query(default=None)` 來設定預設值;對 FastAPI 而言,這達到相同目的。
    
    所以:
    
    ```Python
    q: str | None = Query(default=None)
    ```
    
    …會讓參數變為可選、預設值是 `None`,等同於:
    
    ```Python
    q: str | None = None
    ```
    
    但用 `Query` 的版本會明確宣告它是查詢參數。
    
    接著,我們可以傳更多參數給 `Query`。此例中是用於字串的 `max_length` 參數:
    
    ```Python
    q: str | None = Query(default=None, max_length=50)
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 14.8K bytes
    - Click Count (0)
  2. docs_src/body_multiple_params/tutorial001_py310.py

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int = Path(title="The ID of the item to get", ge=0, le=1000),
        q: str | None = None,
        item: Item | None = None,
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 546 bytes
    - Click Count (0)
  3. tests/test_request_params/test_file/test_list.py

        assert response.json() == {
            "detail": [
                {
                    "type": "missing",
                    "loc": ["body", "p"],
                    "msg": "Field required",
                    "input": None,
                }
            ]
        }
    
    
    @pytest.mark.parametrize(
        "path",
        [
            "/list-bytes",
            "/list-uploadfile",
        ],
    )
    def test_list(path: str):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 21 13:01:31 GMT 2026
    - 11.6K bytes
    - Click Count (0)
  4. docs/tr/docs/_llm-test.md

    Testler:
    
    ## Code snippets { #code-snippets }
    
    //// tab | Test
    
    Bu bir code snippet: `foo`. Bu da başka bir code snippet: `bar`. Bir tane daha: `baz quux`.
    
    ////
    
    //// tab | Bilgi
    
    Code snippet'lerin içeriği olduğu gibi bırakılmalıdır.
    
    `scripts/translate.py` içindeki genel prompt'ta `### Content of code snippets` bölümüne bakın.
    
    ////
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 11.1K bytes
    - Click Count (0)
  5. docs_src/sql_databases/tutorial001_an_py310.py

    from sqlmodel import Field, Session, SQLModel, create_engine, select
    
    
    class Hero(SQLModel, table=True):
        id: int | None = Field(default=None, primary_key=True)
        name: str = Field(index=True)
        age: int | None = Field(default=None, index=True)
        secret_name: str
    
    
    sqlite_file_name = "database.db"
    sqlite_url = f"sqlite:///{sqlite_file_name}"
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Oct 09 19:44:42 GMT 2024
    - 1.7K bytes
    - Click Count (0)
  6. tests/test_form_default.py

    app = FastAPI()
    
    
    @app.post("/urlencoded")
    async def post_url_encoded(age: Annotated[int | None, Form()] = None):
        return age
    
    
    @app.post("/multipart")
    async def post_multi_part(
        age: Annotated[int | None, Form()] = None,
        file: Annotated[bytes | None, File()] = None,
    ):
        return {"file": file, "age": age}
    
    
    client = TestClient(app)
    
    
    def test_form_default_url_encoded():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 829 bytes
    - Click Count (0)
  7. docs/metrics/prometheus/grafana/replication/minio-replication-cluster.json

                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 10,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "insertNulls": false,
                "lineInterpolation": "linear",
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Mon Aug 04 01:46:49 GMT 2025
    - 71.2K bytes
    - Click Count (0)
  8. docs/de/docs/virtual-environments.md

    ```mermaid
    flowchart LR
        subgraph global[globale Umgebung]
            harry-1[harry v1]
        end
        subgraph stone-project[philosophers-stone-Projekt]
            stone(philosophers-stone) -->|benötigt| harry-1
        end
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 24.8K bytes
    - Click Count (0)
  9. docs/fr/docs/virtual-environments.md

    ```mermaid
    flowchart LR
        subgraph global[global env]
            harry-1[harry v1]
        end
        subgraph stone-project[philosophers-stone project]
            stone(philosophers-stone) -->|requires| harry-1
        end
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 24.5K bytes
    - Click Count (0)
  10. fastapi/openapi/utils.py

        openapi_version: str = "3.1.0",
        summary: str | None = None,
        description: str | None = None,
        routes: Sequence[BaseRoute],
        webhooks: Sequence[BaseRoute] | None = None,
        tags: list[dict[str, Any]] | None = None,
        servers: list[dict[str, str | Any]] | None = None,
        terms_of_service: str | None = None,
        contact: dict[str, str | Any] | None = None,
        license_info: dict[str, str | Any] | None = None,
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 25.6K bytes
    - Click Count (0)
Back to Top