Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for Glasser (0.16 sec)

  1. tests/test_inherited_custom_class.py

            def serialize_a_uuid(self, v):
                return str(v)
    
        @app.get("/get_custom_class")
        def return_some_user():
            # Test that the fix also works for custom pydantic classes
            return SomeCustomClass(a_uuid=MyUuid("b8799909-f914-42de-91bc-95c819218d01"))
    
        client = TestClient(app)
    
        with client:
            response_simple = client.get("/fast_uuid")
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3K bytes
    - Viewed (0)
  2. fastapi/encoders.py

                    )
                )
            return encoded_list
    
        if type(obj) in ENCODERS_BY_TYPE:
            return ENCODERS_BY_TYPE[type(obj)](obj)
        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)
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  3. tests/test_custom_route_class.py

    )
    def test_get_path(path, expected_status, expected_response):
        response = client.get(path)
        assert response.status_code == expected_status
        assert response.json() == expected_response
    
    
    def test_route_classes():
        routes = {}
        for r in app.router.routes:
            assert isinstance(r, Route)
            routes[r.path] = r
        assert getattr(routes["/a/"], "x_type") == "A"  # noqa: B009
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  4. fastapi/security/oauth2.py

            )
    
    
    class OAuth2(SecurityBase):
        """
        This is the base class for OAuth2 authentication, an instance of it would be used
        as a dependency. All other OAuth2 classes inherit from it and customize it for
        each OAuth2 flow.
    
        You normally would not create a new class inheriting from it but use one of the
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  5. fastapi/openapi/utils.py

                if route.status_code is not None:
                    status_code = str(route.status_code)
                else:
                    # It would probably make more sense for all response classes to have an
                    # explicit default status_code, and to extract it from them, instead of
                    # doing this inspection tricks, that would probably be in the future
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Sat Aug 26 18:03:13 GMT 2023
    - 21.8K bytes
    - Viewed (0)
Back to top