Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for shortcut (0.21 sec)

  1. fastapi/openapi/docs.py

            current_swagger_ui_parameters.update(swagger_ui_parameters)
    
        html = f"""
        <!DOCTYPE html>
        <html>
        <head>
        <link type="text/css" rel="stylesheet" href="{swagger_css_url}">
        <link rel="shortcut icon" href="{swagger_favicon_url}">
        <title>{title}</title>
        </head>
        <body>
        <div id="swagger-ui">
        </div>
        <script src="{swagger_js_url}"></script>
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 10.1K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/response-status-code.md

    ## Shortcut to remember the names
    
    Let's see the previous example again:
    
    ```Python hl_lines="6"
    {!../../../docs_src/response_status_code/tutorial001.py!}
    ```
    
    `201` is the status code for "Created".
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Aug 29 14:02:58 GMT 2020
    - 4K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/path-operation-configuration.md

    You can define the (HTTP) `status_code` to be used in the response of your *path operation*.
    
    You can pass directly the `int` code, like `404`.
    
    But if you don't remember what each number code is for, you can use the shortcut constants in `status`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="1  15"
        {!> ../../../docs_src/path_operation_configuration/tutorial001_py310.py!}
        ```
    
    === "Python 3.9+"
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

    <img src="/img/tutorial/dependencies/image02.png">
    
    ## Shortcut
    
    But you see that we are having some code repetition here, writing `CommonQueryParams` twice:
    
    === "Python 3.8+"
    
        ```Python
        commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)]
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/response-model.md

    They take a `set` of `str` with the name of the attributes to include (omitting the rest) or to exclude (including the rest).
    
    This can be used as a quick shortcut if you have only one Pydantic model and want to remove some data from the output.
    
    !!! tip
        But it is still recommended to use the ideas above, using multiple classes, instead of these parameters.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.9K bytes
    - Viewed (0)
  6. docs/en/docs/python-types.md

    Using `Optional[str]` instead of just `str` will let the editor help you detecting errors where you could be assuming that a value is always a `str`, when it could actually be `None` too.
    
    `Optional[Something]` is actually a shortcut for `Union[Something, None]`, they are equivalent.
    
    This also means that in Python 3.10, you can use `Something | None`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="1"
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17K bytes
    - Viewed (0)
Back to top