Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 101 - 110 of 1,083 for str (0.01 seconds)

  1. tests/test_jsonable_encoder.py

        role: RoleEnum | None = None
    
        model_config = {"use_enum_values": True}
    
    
    class ModelWithAlias(BaseModel):
        foo: str = Field(alias="Foo")
    
    
    class ModelWithDefault(BaseModel):
        foo: str = ...  # type: ignore
        bar: str = "bar"
        bla: str = "bla"
    
    
    def test_encode_dict():
        pet = {"name": "Firulais", "owner": {"name": "Foo"}}
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 9.2K bytes
    - Click Count (0)
  2. fastapi/_compat/v2.py

        for item_def in cast(dict[str, dict[str, Any]], definitions).values():
            if "description" in item_def:
                item_description = cast(str, item_def["description"]).split("\f")[0]
                item_def["description"] = item_description
        # definitions: dict[DefsRef, dict[str, Any]]
        # but mypy complains about general str in other places that are not declared as
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 16.7K bytes
    - Click Count (0)
  3. docs/ja/docs/tutorial/metadata.md

    | パラメータ | 型 | 説明 |
    |------------|------|-------------|
    | `title` | `str` | APIのタイトルです。 |
    | `summary` | `str` | APIの短い要約です。 <small>OpenAPI 3.1.0、FastAPI 0.99.0 以降で利用できます。</small> |
    | `description` | `str` | APIの短い説明です。Markdownを使用できます。 |
    | `version` | `string` | APIのバージョンです。これはOpenAPIのバージョンではなく、あなた自身のアプリケーションのバージョンです。たとえば `2.5.0` です。 |
    | `terms_of_service` | `str` | APIの利用規約へのURLです。指定する場合、URLである必要があります。 |
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 6.9K bytes
    - Click Count (0)
  4. scripts/topic_repos.py

    from pydantic import BaseModel, SecretStr
    from pydantic_settings import BaseSettings
    
    
    class Settings(BaseSettings):
        github_repository: str
        github_token: SecretStr
    
    
    class Repo(BaseModel):
        name: str
        html_url: str
        stars: int
        owner_login: str
        owner_html_url: str
    
    
    def main() -> None:
        logging.basicConfig(level=logging.INFO)
        settings = Settings()
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Dec 16 12:34:01 GMT 2025
    - 2.7K bytes
    - Click Count (0)
  5. tests/test_json_type.py

    @app.post("/form-json-list")
    def form_json_list(items: Annotated[Json[list[str]], Form()]) -> list[str]:
        return items
    
    
    @app.get("/query-json-list")
    def query_json_list(items: Annotated[Json[list[str]], Query()]) -> list[str]:
        return items
    
    
    @app.get("/header-json-list")
    def header_json_list(x_items: Annotated[Json[list[str]], Header()]) -> list[str]:
        return x_items
    
    
    @app.get("/cookie-json-list")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 05 18:41:43 GMT 2026
    - 1.7K bytes
    - Click Count (0)
  6. docs_src/security/tutorial004_an_py310.py

        }
    }
    
    
    class Token(BaseModel):
        access_token: str
        token_type: str
    
    
    class TokenData(BaseModel):
        username: str | None = None
    
    
    class User(BaseModel):
        username: str
        email: str | None = None
        full_name: str | None = None
        disabled: bool | None = None
    
    
    class UserInDB(User):
        hashed_password: str
    
    
    password_hash = PasswordHash.recommended()
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 18:10:35 GMT 2026
    - 4.2K bytes
    - Click Count (0)
  7. docs_src/pydantic_v1_in_v2/tutorial001_an_py310.py

    from pydantic.v1 import BaseModel
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Oct 11 16:45:54 GMT 2025
    - 124 bytes
    - Click Count (0)
  8. fastapi/security/api_key.py

    from starlette.status import HTTP_401_UNAUTHORIZED
    
    
    class APIKeyBase(SecurityBase):
        model: APIKey
    
        def __init__(
            self,
            location: APIKeyIn,
            name: str,
            description: str | None,
            scheme_name: str | None,
            auto_error: bool,
        ):
            self.auto_error = auto_error
    
            self.model: APIKey = APIKey(
                **{"in": location},  # ty: ignore[invalid-argument-type]
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 9.6K bytes
    - Click Count (1)
  9. docs_src/settings/app01_py310/config.py

    from pydantic_settings import BaseSettings
    
    
    class Settings(BaseSettings):
        app_name: str = "Awesome API"
        admin_email: str
        items_per_user: int = 50
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 183 bytes
    - Click Count (0)
  10. docs_src/request_forms/tutorial001_py310.py

    from fastapi import FastAPI, Form
    
    app = FastAPI()
    
    
    @app.post("/login/")
    async def login(username: str = Form(), password: str = Form()):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 173 bytes
    - Click Count (0)
Back to Top