Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for Try (0.15 sec)

  1. fastapi/security/http.py

            invalid_user_credentials_exc = HTTPException(
                status_code=HTTP_401_UNAUTHORIZED,
                detail="Invalid authentication credentials",
                headers=unauthorized_headers,
            )
            try:
                data = b64decode(param).decode("ascii")
            except (ValueError, UnicodeDecodeError, binascii.Error):
                raise invalid_user_credentials_exc  # noqa: B904
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 15:29:38 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  2. fastapi/dependencies/utils.py

    def check_file_field(field: ModelField) -> None:
        field_info = field.field_info
        if isinstance(field_info, params.Form):
            try:
                # __version__ is available in both multiparts, and can be mocked
                from multipart import __version__  # type: ignore
    
                assert __version__
                try:
                    # parse_options_header is only available in the right multipart
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  3. tests/test_dependency_contextmanager.py

    
    async def asyncgen_state_try(state: Dict[str, str] = Depends(get_state)):
        state["/async_raise"] = "asyncgen raise started"
        try:
            yield state["/async_raise"]
        except AsyncDependencyError:
            errors.append("/async_raise")
            raise
        finally:
            state["/async_raise"] = "asyncgen raise finalized"
    
    
    def generator_state_try(state: Dict[str, str] = Depends(get_state)):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  4. fastapi/encoders.py

        for encoder, classes_tuple in encoders_by_class_tuples.items():
            if isinstance(obj, classes_tuple):
                return encoder(obj)
    
        try:
            data = dict(obj)
        except Exception as e:
            errors: List[Exception] = []
            errors.append(e)
            try:
                data = vars(obj)
            except Exception as e:
                errors.append(e)
                raise ValueError(errors) from e
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  5. fastapi/openapi/models.py

    )
    from fastapi.logger import logger
    from pydantic import AnyUrl, BaseModel, Field
    from typing_extensions import Annotated, 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
    except ImportError:  # pragma: no cover
    
        class EmailStr(str):  # type: ignore
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 22:49:33 GMT 2024
    - 15K bytes
    - Viewed (1)
  6. fastapi/_compat.py

        from pydantic_core import CoreSchema as CoreSchema
        from pydantic_core import PydanticUndefined, PydanticUndefinedType
        from pydantic_core import Url as Url
    
        try:
            from pydantic_core.core_schema import (
                with_info_plain_validator_function as with_info_plain_validator_function,
            )
        except ImportError:  # pragma: no cover
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
Back to top