Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for literally (0.04 sec)

  1. scripts/translate.py

        "contributing.md",
    )
    
    
    general_prompt = """
    ### About literal text in this prompt
    
    1) In the following instructions (after I say: `The above rules are in effect now`) the two characters `«` and `»` will be used to surround LITERAL TEXT, which is text or characters you shall interpret literally. The `«` and the `»` are not part of the literal text, they are the meta characters denoting it.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:05:53 UTC 2025
    - 34.1K bytes
    - Viewed (0)
  2. tests/test_union_body_discriminator.py

    from pydantic import BaseModel, Field
    from typing_extensions import Literal
    
    
    def test_discriminator_pydantic_v2() -> None:
        from pydantic import Tag
    
        app = FastAPI()
    
        class FirstItem(BaseModel):
            value: Literal["first"]
            price: int
    
        class OtherItem(BaseModel):
            value: Literal["other"]
            price: float
    
        Item = Annotated[
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  3. fastapi/_compat/v2.py

        *,
        field: ModelField,
        model_name_map: ModelNameMap,
        field_mapping: dict[
            tuple[ModelField, Literal["validation", "serialization"]], JsonSchemaValue
        ],
        separate_input_output_schemas: bool = True,
    ) -> dict[str, Any]:
        override_mode: Union[Literal["validation"], None] = (
            None
            if (separate_input_output_schemas or _has_computed_fields(field))
            else "validation"
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  4. fastapi/utils.py

        model_config: Union[type[BaseConfig], None] = None,
        field_info: Optional[FieldInfo] = None,
        alias: Optional[str] = None,
        mode: Literal["validation", "serialization"] = "validation",
        version: Literal["1", "auto"] = "auto",
    ) -> ModelField:
        if annotation_is_pydantic_v1(type_):
            raise PydanticV1NotSupportedError(
                "pydantic.v1 models are no longer supported by FastAPI."
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  5. fastapi/openapi/utils.py

        generate_operation_id_for_path,
        is_body_allowed_for_status_code,
    )
    from pydantic import BaseModel
    from starlette.responses import JSONResponse
    from starlette.routing import BaseRoute
    from typing_extensions import Literal
    
    validation_error_definition = {
        "title": "ValidationError",
        "type": "object",
        "properties": {
            "loc": {
                "title": "Location",
                "type": "array",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 23.2K bytes
    - Viewed (0)
  6. fastapi/openapi/models.py

    from fastapi._compat import with_info_plain_validator_function
    from fastapi.logger import logger
    from pydantic import (
        AnyUrl,
        BaseModel,
        Field,
        GetJsonSchemaHandler,
    )
    from typing_extensions import Literal, TypedDict
    from typing_extensions import deprecated as typing_deprecated
    
    try:
        import email_validator
    
        assert email_validator  # make autoflake ignore the unused import
        from pydantic import EmailStr
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  7. fastapi/params.py

    from fastapi.exceptions import FastAPIDeprecationWarning
    from fastapi.openapi.models import Example
    from pydantic import AliasChoices, AliasPath
    from pydantic.fields import FieldInfo
    from typing_extensions import Literal, deprecated
    
    from ._compat import (
        Undefined,
    )
    
    _Unset: Any = Undefined
    
    
    class ParamTypes(Enum):
        query = "query"
        header = "header"
        path = "path"
        cookie = "cookie"
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 26.3K bytes
    - Viewed (0)
  8. fastapi/dependencies/utils.py

        QueryParams,
        UploadFile,
    )
    from starlette.requests import HTTPConnection, Request
    from starlette.responses import Response
    from starlette.websockets import WebSocket
    from typing_extensions import Literal, get_args, get_origin
    
    multipart_not_installed_error = (
        'Form data requires "python-multipart" to be installed. \n'
        'You can install "python-multipart" with: \n\n'
        "pip install python-multipart\n"
    )
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 37.6K bytes
    - Viewed (3)
  9. fastapi/param_functions.py

    from annotated_doc import Doc
    from fastapi import params
    from fastapi._compat import Undefined
    from fastapi.openapi.models import Example
    from pydantic import AliasChoices, AliasPath
    from typing_extensions import Literal, deprecated
    
    _Unset: Any = Undefined
    
    
    def Path(  # noqa: N802
        default: Annotated[
            Any,
            Doc(
                """
                Default value if the parameter field is not set.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 63K bytes
    - Viewed (0)
  10. docs/en/docs/release-notes.md

    Use Pydantic models for `Query` parameters:
    
    ```python
    from typing import Annotated, Literal
    
    from fastapi import FastAPI, Query
    from pydantic import BaseModel, Field
    
    app = FastAPI()
    
    
    class FilterParams(BaseModel):
        limit: int = Field(100, gt=0, le=100)
        offset: int = Field(0, ge=0)
        order_by: Literal["created_at", "updated_at"] = "created_at"
        tags: list[str] = []
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:06:15 UTC 2025
    - 586.7K bytes
    - Viewed (0)
Back to top