Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 114 for One (0.21 sec)

  1. docs_src/python_types/tutorial010.py

    class Person:
        def __init__(self, name: str):
            self.name = name
    
    
    def get_person_name(one_person: Person):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 12 21:44:23 GMT 2020
    - 144 bytes
    - Viewed (0)
  2. docs/en/docs/alternatives.md

    It is used by many companies including Mozilla, Red Hat and Eventbrite.
    
    It was one of the first examples of **automatic API documentation**, and this was specifically one of the first ideas that inspired "the search for" **FastAPI**.
    
    !!! note
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_websockets/test_tutorial002_py310.py

        client = TestClient(app, cookies={"session": "fakesession"})
        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/foo/ws") as websocket:
                message = "Message one"
                websocket.send_text(message)
                data = websocket.receive_text()
                assert data == "Session cookie or query token value is: fakesession"
                data = websocket.receive_text()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  4. fastapi/security/oauth2.py

        username: username string. The OAuth2 spec requires the exact field name "username".
        password: password string. The OAuth2 spec requires the exact field name "password".
        scope: Optional string. Several scopes (each one a string) separated by spaces. E.g.
            "items:read items:write users:read profile openid"
        client_id: optional string. OAuth2 recommends sending the client_id and client_secret (if any)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  5. fastapi/param_functions.py

                'Whitelist' validation step. The parameter field will be the single one
                allowed by the alias or set of aliases defined.
                """
            ),
        ] = None,
        serialization_alias: Annotated[
            Union[str, None],
            Doc(
                """
                'Blacklist' validation step. The vanilla parameter field will be the
                single one of the alias' or set of aliases' fields and all the other
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/security/index.md

    !!! tip
        The next sections are **not necessarily "advanced"**.
    
        And it's possible that for your use case, the solution is in one of them.
    
    ## Read the Tutorial first
    
    The next sections assume you already read the main [Tutorial - User Guide: Security](../../tutorial/security/index.md){.internal-link target=_blank}.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 633 bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/first-steps.md

    #### Operation
    
    "Operation" here refers to one of the HTTP "methods".
    
    One of:
    
    * `POST`
    * `GET`
    * `PUT`
    * `DELETE`
    
    ...and the more exotic ones:
    
    * `OPTIONS`
    * `HEAD`
    * `PATCH`
    * `TRACE`
    
    In the HTTP protocol, you can communicate to each path using one (or more) of these "methods".
    
    ---
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  8. fastapi/security/http.py

                    be `None`.
    
                    This is useful when you want to have optional authentication.
    
                    It is also useful when you want to have authentication that can be
                    provided in one of multiple optional ways (for example, in HTTP Basic
                    authentication or in an HTTP Bearer token).
                    """
                ),
            ] = True,
        ):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Apr 19 15:29:38 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_dependencies/test_tutorial012_an.py

                    },
                ]
            }
        )
    
    
    def test_get_invalid_one_header_items():
        response = client.get("/items/", headers={"X-Token": "invalid"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "X-Token header invalid"}
    
    
    def test_get_invalid_one_users():
        response = client.get("/users/", headers={"X-Token": "invalid"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/path-params.md

    And then you can also have a path `/users/{user_id}` to get data about a specific user by some user ID.
    
    Because *path operations* are evaluated in order, you need to make sure that the path for `/users/me` is declared before the one for `/users/{user_id}`:
    
    ```Python hl_lines="6  11"
    {!../../../docs_src/path_params/tutorial003.py!}
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
Back to top