Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 511 - 520 of 1,675 for tone (0.02 seconds)

  1. tests/test_tutorial/test_body_nested_models/test_tutorial006.py

        assert response.json() == {
            "item_id": 5,
            "item": {
                "name": "Foo",
                "description": None,
                "price": 35.4,
                "tax": None,
                "tags": [],
                "images": None,
            },
        }
    
    
    def test_put_empty_body(client: TestClient):
        response = client.put(
            "/items/5",
            json={},
        )
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Dec 26 10:43:02 GMT 2025
    - 8.7K bytes
    - Click Count (0)
  2. src/bytes/bytes.go

    // It returns the byte index in s of the first Unicode
    // code point satisfying f(c), or -1 if none do.
    func IndexFunc(s []byte, f func(r rune) bool) int {
    	return indexFunc(s, f, true)
    }
    
    // LastIndexFunc interprets s as a sequence of UTF-8-encoded code points.
    // It returns the byte index in s of the last Unicode
    // code point satisfying f(c), or -1 if none do.
    func LastIndexFunc(s []byte, f func(r rune) bool) int {
    Created: Tue Dec 30 11:13:12 GMT 2025
    - Last Modified: Tue Sep 16 16:42:15 GMT 2025
    - 35.5K bytes
    - Click Count (0)
  3. tests/test_dependency_after_yield_streaming.py

    class Session:
        def __init__(self) -> None:
            self.data = ["foo", "bar", "baz"]
            self.open = True
    
        def __iter__(self) -> Generator[str, None, None]:
            for item in self.data:
                if self.open:
                    yield item
                else:
                    raise ValueError("Session closed")
    
    
    @contextmanager
    def acquire_session() -> Generator[Session, None, None]:
        session = Session()
        try:
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 3.2K bytes
    - Click Count (0)
  4. docs/zh-hant/docs/virtual-environments.md

    如果你想運行 `philosophers-stone`,你需要先安裝 `harry` 版本 `1`,例如:
    
    <div class="termy">
    
    ```console
    $ pip install "harry==1"
    ```
    
    </div>
    
    然後你會在全域 Python 環境中安裝 `harry` 版本 `1`。
    
    ```mermaid
    flowchart LR
        subgraph global[全域環境]
            harry-1[harry v1]
        end
        subgraph stone-project[專案 philosophers-stone]
            stone(philosophers-stone) -->|需要| harry-1
        end
    ```
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Dec 09 22:39:33 GMT 2024
    - 20.7K bytes
    - Click Count (0)
  5. docs/zh/docs/virtual-environments.md

    如果你想运行 `philosophers-stone`,你需要首先安装 `harry` 版本 `1`,例如:
    
    <div class="termy">
    
    ```console
    $ pip install "harry==1"
    ```
    
    </div>
    
    然后你将在全局 Python 环境中安装 `harry` 版本 `1`。
    
    ```mermaid
    flowchart LR
        subgraph global[全局环境]
            harry-1[harry v1]
        end
        subgraph stone-project[工程 philosophers-stone]
            stone(philosophers-stone) -->|需要| harry-1
        end
    ```
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Nov 08 19:23:26 GMT 2024
    - 21K bytes
    - Click Count (0)
  6. docs_src/header_params/tutorial002_an_py310.py

    from typing import Annotated
    
    from fastapi import FastAPI, Header
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        strange_header: Annotated[str | None, Header(convert_underscores=False)] = None,
    ):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 261 bytes
    - Click Count (0)
  7. docs_src/app_testing/app_b_an_py310/main.py

        "bar": {"id": "bar", "title": "Bar", "description": "The bartenders"},
    }
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        id: str
        title: str
        description: str | None = None
    
    
    @app.get("/items/{item_id}", response_model=Item)
    async def read_main(item_id: str, x_token: Annotated[str, Header()]):
        if x_token != fake_secret_token:
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Thu Aug 15 22:31:16 GMT 2024
    - 1.1K bytes
    - Click Count (0)
  8. tests/test_custom_schema_fields.py

    from pydantic import BaseModel, WithJsonSchema
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
    
        description: Annotated[
            Optional[str], WithJsonSchema({"type": ["string", "null"]})
        ] = None
    
        model_config = {
            "json_schema_extra": {
                "x-something-internal": {"level": 4},
            }
        }
    
    
    @app.get("/foo", response_model=Item)
    def foo():
        return {"name": "Foo item"}
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 1.3K bytes
    - Click Count (0)
  9. tests/test_validate_response_dataclass.py

    from fastapi.testclient import TestClient
    from pydantic.dataclasses import dataclass
    
    app = FastAPI()
    
    
    @dataclass
    class Item:
        name: str
        price: Optional[float] = None
        owner_ids: Optional[list[int]] = None
    
    
    @app.get("/items/invalid", response_model=Item)
    def get_invalid():
        return {"name": "invalid", "price": "foo"}
    
    
    @app.get("/items/innerinvalid", response_model=Item)
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 1.2K bytes
    - Click Count (0)
  10. docs_src/query_params/tutorial002_py310.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: str, q: str | None = None):
        if q:
            return {"item_id": item_id, "q": q}
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 219 bytes
    - Click Count (0)
Back to Top