Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for issubclass (0.05 sec)

  1. fastapi/_compat/shared.py

    
    # Copy of Pydantic v2, compatible with v1
    def lenient_issubclass(
        cls: Any, class_or_tuple: Union[type[Any], tuple[type[Any], ...], None]
    ) -> bool:
        try:
            return isinstance(cls, type) and issubclass(cls, class_or_tuple)  # type: ignore[arg-type]
        except TypeError:  # pragma: no cover
            if isinstance(cls, WithArgsTypes):
                return False
            raise  # pragma: no cover
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  2. tests/test_generate_unique_id_function.py

            warnings.simplefilter("always")
            client.get("/openapi.json")
            assert len(w) >= 2
            duplicate_warnings = [
                warning for warning in w if issubclass(warning.category, UserWarning)
            ]
            assert len(duplicate_warnings) > 0
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 66.7K bytes
    - Viewed (0)
  3. fastapi/_compat/v2.py

            for union_arg in union_args:
                if union_arg is type(None):
                    continue
                origin_type = get_origin(union_arg) or union_arg
                break
        assert issubclass(origin_type, shared.sequence_types)  # type: ignore[arg-type]
        return shared.sequence_annotation_to_type[origin_type](value)  # type: ignore[no-any-return,index]
    
    
    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. docs/en/docs/tutorial/response-model.md

    And tools will also be happy because both `RedirectResponse` and `JSONResponse` are subclasses of `Response`, so the type annotation is correct.
    
    ### Annotate a Response Subclass { #annotate-a-response-subclass }
    
    You can also use a subclass of `Response` in the type annotation:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 15.5K bytes
    - Viewed (0)
  5. docs/en/docs/how-to/custom-request-and-route.md

    * Automatically logging all request bodies.
    
    ## Handling custom request body encodings { #handling-custom-request-body-encodings }
    
    Let's see how to make use of a custom `Request` subclass to decompress gzip requests.
    
    And an `APIRoute` subclass to use that custom request class.
    
    ### Create a custom `GzipRequest` class { #create-a-custom-gziprequest-class }
    
    /// tip
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 10 08:55:32 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  6. fastapi/security/open_id_connect_url.py

        **Warning**: this is only a stub to connect the components with OpenAPI in FastAPI,
        but it doesn't implement the full OpenIdConnect scheme, for example, it doesn't use
        the OpenIDConnect URL. You would need to to subclass it and implement it in your
        code.
        """
    
        def __init__(
            self,
            *,
            openIdConnectUrl: Annotated[
                str,
                Doc(
                    """
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 3.1K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/custom-response.md

    But if you return a `Response` directly (or any subclass, like `JSONResponse`), the data won't be automatically converted (even if you declare a `response_model`), and the documentation won't be automatically generated (for example, including the specific "media type", in the HTTP header `Content-Type` as part of the generated OpenAPI).
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 12.4K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/AbstractMapBasedMultiset.java

    import org.jspecify.annotations.Nullable;
    
    /**
     * Basic implementation of {@code Multiset<E>} backed by an instance of {@code
     * ObjectCountHashMap<E>}.
     *
     * <p>For serialization to work, the subclass must specify explicit {@code readObject} and {@code
     * writeObject} methods.
     *
     * @author Kevin Bourrillion
     */
    @GwtCompatible
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Fri Dec 05 23:15:58 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  9. fastapi/security/http.py

        """
        HTTP Digest authentication.
    
        **Warning**: this is only a stub to connect the components with OpenAPI in FastAPI,
        but it doesn't implement the full Digest scheme, you would need to to subclass it
        and implement it in your code.
    
        Ref: https://datatracker.ietf.org/doc/html/rfc7616
    
        ## Usage
    
        Create an instance object and use that object as the dependency in `Depends()`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 13.2K bytes
    - Viewed (0)
  10. docs/pt/docs/tutorial/response-model.md

    E as ferramentas também ficarão felizes porque `RedirectResponse` e ​​`JSONResponse` são subclasses de `Response`, então a anotação de tipo está correta.
    
    ### Anote uma subclasse de Response { #annotate-a-response-subclass }
    
    Você também pode usar uma subclasse de `Response` na anotação de tipo:
    
    {* ../../docs_src/response_model/tutorial003_03_py39.py hl[8:9] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 17.3K bytes
    - Viewed (0)
Back to top