Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 39 for unless (0.17 sec)

  1. docs/en/docs/advanced/additional-responses.md

    ```Python hl_lines="19-24  28"
    {!../../../docs_src/additional_responses/tutorial002.py!}
    ```
    
    !!! note
        Notice that you have to return the image using a `FileResponse` directly.
    
    !!! info
        Unless you specify a different media type explicitly in your `responses` parameter, FastAPI will assume the response has the same media type as the main response class (default `application/json`).
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    ### Always `raise` in Dependencies with `yield` and `except`
    
    If you catch an exception in a dependency with `yield`, unless you are raising another `HTTPException` or similar, you should re-raise the original exception.
    
    You can re-raise the same exception using `raise`:
    
    === "Python 3.9+"
    
        ```Python hl_lines="17"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/sql-databases.md

    #### Technical Details about ORM mode
    
    SQLAlchemy and many others are by default "lazy loading".
    
    That means, for example, that they don't fetch the data for relationships from the database unless you try to access the attribute that would contain that data.
    
    For example, accessing the attribute `items`:
    
    ```Python
    current_user.items
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 29.6K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/path-params-numeric-validations.md

        ```
    
    ## Number validations: floats, greater than and less than
    
    Number validations also work for `float` values.
    
    Here's where it becomes important to be able to declare <abbr title="greater than"><code>gt</code></abbr> and not just <abbr title="greater than or equal"><code>ge</code></abbr>. As with it you can require, for example, that a value must be greater than `0`, even if it is less than `1`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  5. docs/en/docs/index.md

    * **Intuitive**: Great editor support. <abbr title="also known as auto-complete, autocompletion, IntelliSense">Completion</abbr> everywhere. Less time debugging.
    * **Easy**: Designed to be easy to use and learn. Less time reading docs.
    * **Short**: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19.2K bytes
    - Viewed (0)
  6. fastapi/dependencies/utils.py

            security_scopes=security_scopes,
        )
    
    
    def get_parameterless_sub_dependant(*, depends: params.Depends, path: str) -> Dependant:
        assert callable(
            depends.dependency
        ), "A parameter-less dependency must have a callable dependency"
        return get_sub_dependant(depends=depends, dependency=depends.dependency, path=path)
    
    
    def get_sub_dependant(
        *,
        depends: params.Depends,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  7. docs/en/docs/async.md

    used to defining trivial compute-only *path operation functions* with plain `def` for a tiny performance gain (about 100 nanoseconds), please note that in **FastAPI** the effect would be quite opposite. In these cases, it's better to use `async def` unless your *path operation functions* use code that performs blocking <abbr title="Input/Output: disk reading or writing, network communications.">I/O</abbr>.
    
    Still, in both situations, chances are that **FastAPI** will [still be faster](ind...
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23K bytes
    - Viewed (0)
  8. docs/en/docs/how-to/sql-databases-peewee.md

    Then, for the request in the next tab, your app will wait for one second less, and so on.
    
    This means that it will end up finishing some of the last tabs' requests earlier than some of the previous ones.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 23.6K bytes
    - Viewed (0)
  9. .github/DISCUSSION_TEMPLATE/questions.yml

            That's a lot of work they are doing, but if more FastAPI users came to help others like them just a little bit more, it would be much less effort for them (and you and me 😅).
    
            By asking questions in a structured way (following this) it will be much easier to help you.
    
    Others
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Aug 03 15:59:41 GMT 2023
    - 5.8K bytes
    - Viewed (1)
  10. docs/zh/docs/tutorial/path-params-numeric-validations.md

    数值校验同样适用于 `float` 值。
    
    能够声明 <abbr title="大于"><code>gt</code></abbr> 而不仅仅是 <abbr title="大于等于"><code>ge</code></abbr> 在这个前提下变得重要起来。例如,你可以要求一个值必须大于 `0`,即使它小于 `1`。
    
    因此,`0.5` 将是有效值。但是 `0.0`或 `0` 不是。
    
    对于 <abbr title="less than"><code>lt</code></abbr> 也是一样的。
    
    ```Python hl_lines="11"
    {!../../../docs_src/path_params_numeric_validations/tutorial006.py!}
    ```
    
    ## 总结
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 6.3K bytes
    - Viewed (0)
Back to top