Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 53 for it (0.2 sec)

  1. tests/test_tutorial/test_extra_models/test_tutorial004.py

        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [
            {"name": "Foo", "description": "There comes my hero"},
            {"name": "Red", "description": "It's my aeroplane"},
        ]
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_header_params/test_tutorial003_an_py310.py

        "path,headers,expected_status,expected_response",
        [
            ("/items", None, 200, {"X-Token values": None}),
            ("/items", {"x-token": "foo"}, 200, {"X-Token values": ["foo"]}),
            # TODO: fix this, is it a bug?
            # ("/items", [("x-token", "foo"), ("x-token", "bar")], 200, {"X-Token values": ["foo", "bar"]}),
        ],
    )
    def test(path, headers, expected_status, expected_response, client: TestClient):
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_header_params/test_tutorial003_py310.py

        "path,headers,expected_status,expected_response",
        [
            ("/items", None, 200, {"X-Token values": None}),
            ("/items", {"x-token": "foo"}, 200, {"X-Token values": ["foo"]}),
            # TODO: fix this, is it a bug?
            # ("/items", [("x-token", "foo"), ("x-token", "bar")], 200, {"X-Token values": ["foo", "bar"]}),
        ],
    )
    def test(path, headers, expected_status, expected_response, client: TestClient):
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  4. docs/sts/web-identity.py

    @app.route('/')
    def homepage():
        text = '<a href="%s">Authenticate with keycloak</a>'
        return text % make_authorization_url()
    
    
    def make_authorization_url():
        # Generate a random string for the state parameter
        # Save it for use later to prevent xsrf attacks
    
        state = str(uuid4())
        params = {"client_id": client_id,
                  "response_type": "code",
                  "state": state,
                  "redirect_uri": callback_uri,
    Python
    - Registered: Sun Apr 14 19:28:10 GMT 2024
    - Last Modified: Wed Jul 28 01:37:51 GMT 2021
    - 2.9K bytes
    - Viewed (1)
  5. fastapi/routing.py

                    It could be any valid Pydantic *field* type. So, it doesn't have to
                    be a Pydantic model, it could be other things, like a `list`, `dict`,
                    etc.
    
                    It will be used for:
    
                    * Documentation: the generated OpenAPI (and the UI at `/docs`) will
                        show it as the response (JSON Schema).
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  6. fastapi/applications.py

            internally.
    
            The first time it is called it stores the result in the attribute
            `app.openapi_schema`, and next times it is called, it just returns that same
            result. To avoid the cost of generating the schema every time.
    
            If you need to modify the generated OpenAPI schema, you could modify it.
    
            Read more in the
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
  7. fastapi/security/open_id_connect_url.py

                    """
                    Security scheme name.
    
                    It will be included in the generated OpenAPI (e.g. visible at `/docs`).
                    """
                ),
            ] = None,
            description: Annotated[
                Optional[str],
                Doc(
                    """
                    Security scheme description.
    
                    It will be included in the generated OpenAPI (e.g. visible at `/docs`).
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  8. fastapi/encoders.py

        This is used internally by FastAPI to make sure anything you return can be
        encoded as JSON before it is sent to the client.
    
        You can also use it yourself, for example to convert objects before saving them
        in a database that supports only JSON.
    
        Read more about it in the
        [FastAPI docs for JSON Compatible Encoder](https://fastapi.tiangolo.com/tutorial/encoder/).
        """
    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)
  9. fastapi/exceptions.py

                Doc(
                    """
                    The reason to close the WebSocket connection.
    
                    It is UTF-8-encoded data. The interpretation of the reason is up to the
                    application, it is not specified by the WebSocket specification.
    
                    It could contain text that could be human-readable or interpretable
                    by the client code, etc.
                    """
                ),
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  10. fastapi/security/oauth2.py

        You could have custom internal logic to separate it by colon caracters (`:`) or
        similar, and get the two parts `items` and `read`. Many applications do that to
        group and organize permissions, you could do it as well in your application, just
        know that that it is application specific, it's not part of the specification.
    
    
        grant_type: the OAuth2 spec says it is required and MUST be the fixed string "password".
    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)
Back to top