Search Options

Results per page
Sort
Preferred Languages
Advance

Results 551 - 560 of 1,594 for tone (0.31 sec)

  1. docs_src/extra_models/tutorial002_py39.py

    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel, EmailStr
    
    app = FastAPI()
    
    
    class UserBase(BaseModel):
        username: str
        email: EmailStr
        full_name: Union[str, None] = None
    
    
    class UserIn(UserBase):
        password: str
    
    
    class UserOut(UserBase):
        pass
    
    
    class UserInDB(UserBase):
        hashed_password: str
    
    
    def fake_password_hasher(raw_password: str):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 830 bytes
    - Viewed (0)
  2. docs_src/sql_databases/tutorial001_an_py39.py

    from sqlmodel import Field, Session, SQLModel, create_engine, select
    
    
    class Hero(SQLModel, table=True):
        id: Union[int, None] = Field(default=None, primary_key=True)
        name: str = Field(index=True)
        age: Union[int, None] = Field(default=None, index=True)
        secret_name: str
    
    
    sqlite_file_name = "database.db"
    sqlite_url = f"sqlite:///{sqlite_file_name}"
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  3. tests/test_optional_file_list.py

    from typing import Optional
    
    from fastapi import FastAPI, File
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.post("/files")
    async def upload_files(files: Optional[list[bytes]] = File(None)):
        if files is None:
            return {"files_count": 0}
        return {"files_count": len(files), "sizes": [len(f) for f in files]}
    
    
    def test_optional_bytes_list():
        client = TestClient(app)
        response = client.post(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 821 bytes
    - Viewed (0)
  4. docs_src/response_model/tutorial006_py39.py

    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: float = 10.5
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The Bar fighters", "price": 62, "tax": 20.2},
        "baz": {
            "name": "Baz",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 848 bytes
    - Viewed (0)
  5. tests/test_request_params/test_header/test_list.py

            "detail": [
                {
                    "type": "missing",
                    "loc": ["header", "p_alias"],
                    "msg": "Field required",
                    "input": IsOneOf(None, IsPartialDict({"p": ["hello", "world"]})),
                }
            ]
        }
    
    
    @pytest.mark.parametrize(
        "path",
        [
            "/required-list-alias",
            "/model-required-list-alias",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:31:34 UTC 2025
    - 11K bytes
    - Viewed (0)
  6. docs/resiliency/resiliency-initial-script.sh

    		echo retry: timeout while running: mc alias set
    		exit 1
    	fi
    	eval ./mc alias set "${ALIAS_NAME}" "${MINIO_SERVER_URL}" minioadmin minioadmin && break
    	TIMEOUT=$((TIMEOUT - 1))
    	sleep 1
    done
    
    ./mc ready "${ALIAS_NAME}"
    
    ./mc mb "${ALIAS_NAME}"/"${BUCKET}"
    rm -rf "${SRC_DIR}" "${INLINED_DIR}" "${DEST_DIR}" && mkdir -p "${SRC_DIR}" "${INLINED_DIR}" "${DEST_DIR}"
    for idx in {1..10}; do
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Sat Dec 21 04:24:45 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  7. helm-releases/minio-4.1.0.tgz

    buckets: # # Name of the bucket # - name: bucket1 # # Policy to be set on the # # bucket [none|download|upload|public] # policy: none # # Purge if bucket exists already # purge: false # # set versioning for # # bucket [true|false] # versioning: false # # set objectlocking for # # bucket [true|false] NOTE: versioning is enabled by default if you use locking # objectlocking: false # - name: bucket2 # policy: none # purge: false # versioning: true # # set objectlocking for # # bucket [true|false] NOTE:...
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Mon Oct 24 20:37:05 UTC 2022
    - 20K bytes
    - Viewed (0)
  8. 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:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  9. tests/test_union_body_discriminator_annotated.py

    
    def test_union_body_discriminator_assignment(client: TestClient) -> None:
        response = client.post("/pet/assignment", json={"pet_type": "cat", "meows": 5})
        assert response.status_code == 200, response.text
        assert response.json() == {"pet_type": "cat", "meows": 5}
    
    
    def test_union_body_discriminator_annotated(client: TestClient) -> None:
        response = client.post("/pet/annotated", json={"pet_type": "dog", "barks": 3.5})
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 7.7K bytes
    - Viewed (0)
  10. docs/tr/docs/index.md

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: float
        is_offer: Union[bool, None] = None
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    
    
    @app.put("/items/{item_id}")
    def update_item(item_id: int, item: Item):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 21.9K bytes
    - Viewed (0)
Back to top