Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for Kass (0.13 sec)

  1. docs/en/docs/tutorial/testing.md

    ```
    
    Whenever you need the client to pass information in the request and you don't know how to, you can search (Google) how to do it in `httpx`, or even how to do it with `requests`, as HTTPX's design is based on Requests' design.
    
    Then you just do the same in your tests.
    
    E.g.:
    
    * To pass a *path* or *query* parameter, add it to the URL itself.
    * To pass a JSON body, pass a Python object (e.g. a `dict`) to the parameter `json`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  2. docs/en/docs/deployment/manually.md

        ---> 100%
        ```
    
        </div>
    
        ...or any other ASGI server.
    
    ## Run the Server Program
    
    If you installed an ASGI server manually, you would normally need to pass an import string in a special format for it to import your FastAPI application:
    
    === "Uvicorn"
    
        <div class="termy">
    
        ```console
        $ uvicorn main:app --host 0.0.0.0 --port 80
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  3. fastapi/utils.py

    
    def get_value_or_default(
        first_item: Union[DefaultPlaceholder, DefaultType],
        *extra_items: Union[DefaultPlaceholder, DefaultType],
    ) -> Union[DefaultPlaceholder, DefaultType]:
        """
        Pass items or `DefaultPlaceholder`s by descending priority.
    
        The first one to _not_ be a `DefaultPlaceholder` will be returned.
    
        Otherwise, the first item (a `DefaultPlaceholder`) will be returned.
        """
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/generate-clients.md

    You can customize that function. It takes an `APIRoute` and outputs a string.
    
    For example, here it is using the first tag (you will probably have only one tag) and the *path operation* name (the function name).
    
    You can then pass that custom function to **FastAPI** as the `generate_unique_id_function` parameter:
    
    === "Python 3.9+"
    
        ```Python hl_lines="6-7  10"
        {!> ../../../docs_src/generate_clients/tutorial003_py39.py!}
        ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/behind-a-proxy.md

    But you can also provide other alternative `servers`, for example if you want *the same* docs UI to interact with a staging and production environments.
    
    If you pass a custom list of `servers` and there's a `root_path` (because your API lives behind a proxy), **FastAPI** will insert a "server" with this `root_path` at the beginning of the list.
    
    For example:
    
    ```Python hl_lines="4-7"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 11.6K bytes
    - Viewed (2)
  6. fastapi/param_functions.py

            Optional[Callable[..., Any]],
            Doc(
                """
                A "dependable" callable (like a function).
    
                Don't call it directly, FastAPI will call it for you, just pass the object
                directly.
                """
            ),
        ] = None,
        *,
        use_cache: Annotated[
            bool,
            Doc(
                """
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  7. docs/en/docs/python-types.md

    * The variable `items_t` is a `tuple` with 3 items, an `int`, another `int`, and a `str`.
    * The variable `items_s` is a `set`, and each of its items is of type `bytes`.
    
    #### Dict
    
    To define a `dict`, you pass 2 type parameters, separated by commas.
    
    The first type parameter is for the keys of the `dict`.
    
    The second type parameter is for the values of the `dict`:
    
    === "Python 3.9+"
    
        ```Python hl_lines="1"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/security/oauth2-jwt.md

    ## Password hashing
    
    "Hashing" means converting some content (a password in this case) into a sequence of bytes (just a string) that looks like gibberish.
    
    Whenever you pass exactly the same content (exactly the same password) you get exactly the same gibberish.
    
    But you cannot convert from the gibberish back to the password.
    
    ### Why use password hashing
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13K bytes
    - Viewed (0)
  9. docs/en/docs/release-notes.md

    In short, if you had dependencies that looked like:
    
    ```Python
    def my_dep():
        try:
            yield
        except SomeException:
            pass
    ```
    
    Now you need to make sure you raise again after `except`, just as you would in regular Python:
    
    ```Python
    def my_dep():
        try:
            yield
        except SomeException:
            raise
    ```
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
  10. docs/en/docs/tutorial/extra-models.md

        'password': 'secret',
        'email': '******@****.***',
        'full_name': None,
    }
    ```
    
    #### Unwrapping a `dict`
    
    If we take a `dict` like `user_dict` and pass it to a function (or class) with `**user_dict`, Python will "unwrap" it. It will pass the keys and values of the `user_dict` directly as key-value arguments.
    
    So, continuing with the `user_dict` from above, writing:
    
    ```Python
    UserInDB(**user_dict)
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (1)
Back to top