Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 67 for Bajram (0.18 sec)

  1. tests/main.py

    @app.get("/path/param-min_maxlength/{item_id}")
    def get_path_param_min_max_length(item_id: str = Path(max_length=3, min_length=2)):
        return item_id
    
    
    @app.get("/path/param-gt/{item_id}")
    def get_path_param_gt(item_id: float = Path(gt=3)):
        return item_id
    
    
    @app.get("/path/param-gt0/{item_id}")
    def get_path_param_gt0(item_id: float = Path(gt=0)):
        return item_id
    
    
    @app.get("/path/param-ge/{item_id}")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  2. fastapi/dependencies/utils.py

            type_annotation, depends, param_field = analyze_param(
                param_name=param_name,
                annotation=param.annotation,
                value=param.default,
                is_path_param=is_path_param,
            )
            if depends is not None:
                sub_dependant = get_param_sub_dependant(
                    param_name=param_name,
                    depends=depends,
                    path=path,
    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)
  3. fastapi/openapi/utils.py

                if parameters:
                    all_parameters = {
                        (param["in"], param["name"]): param for param in parameters
                    }
                    required_parameters = {
                        (param["in"], param["name"]): param
                        for param in parameters
                        if param.get("required")
                    }
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  4. fastapi/security/utils.py

    from typing import Optional, Tuple
    
    
    def get_authorization_scheme_param(
        authorization_header_value: Optional[str],
    ) -> Tuple[str, str]:
        if not authorization_header_value:
            return "", ""
        scheme, _, param = authorization_header_value.partition(" ")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Nov 13 14:26:09 GMT 2022
    - 293 bytes
    - Viewed (0)
  5. tests/test_ambiguous_params.py

    import pytest
    from fastapi import Depends, FastAPI, Path
    from fastapi.param_functions import Query
    from fastapi.testclient import TestClient
    from fastapi.utils import PYDANTIC_V2
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    def test_no_annotated_defaults():
        with pytest.raises(
            AssertionError, match="Path parameters cannot have a default value"
        ):
    
            @app.get("/items/{item_id}/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Dec 12 00:22:47 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/body-fields.md

    !!! note "Технические детали"
        На самом деле, `Query`, `Path` и другие функции, которые вы увидите в дальнейшем, создают объекты подклассов общего класса `Param`, который сам по себе является подклассом `FieldInfo` из Pydantic.
    
        И `Field` (из Pydantic), и `Body`, оба возвращают объекты подкласса `FieldInfo`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/body-fields.md

    !!! note "Technische Details"
        Tatsächlich erstellen `Query`, `Path` und andere, die sie kennenlernen werden, Instanzen von Unterklassen einer allgemeinen Klasse `Param`, die ihrerseits eine Unterklasse von Pydantics `FieldInfo`-Klasse ist.
    
        Und Pydantics `Field` gibt ebenfalls eine Instanz von `FieldInfo` zurück.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 29 17:36:19 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  8. docs/pt/docs/tutorial/header-params.md

        {!> ../../../docs_src/header_params/tutorial001.py!}
        ```
    
    !!! note "Detalhes Técnicos"
        `Header` é uma classe "irmã" de `Path`, `Query` e `Cookie`. Ela também herda da mesma classe em comum `Param`.
    
        Mas lembre-se que quando você importa `Query`, `Path`, `Header`, e outras de `fastapi`, elas são na verdade funções que retornam classes especiais.
    
    !!! info
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/header-params.md

        ```Python hl_lines="9"
        {!> ../../../docs_src/header_params/tutorial001.py!}
        ```
    
    !!! note "Technical Details"
        `Header` is a "sister" class of `Path`, `Query` and `Cookie`. It also inherits from the same common `Param` class.
    
        But remember that when you import `Query`, `Path`, `Header`, and others from `fastapi`, those are actually functions that return special classes.
    
    !!! info
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  10. docs/ja/docs/tutorial/path-params-numeric-validations.md

    また、数値のバリデーションを宣言することもできます:
    
    * `gt`: より大きい(`g`reater `t`han)
    * `ge`: 以上(`g`reater than or `e`qual)
    * `lt`: より小さい(`l`ess `t`han)
    * `le`: 以下(`l`ess than or `e`qual)
    
    !!! info "情報"
        `Query`、`Path`などは後に共通の`Param`クラスのサブクラスを見ることになります。(使う必要はありません)
    
        そして、それらすべては、これまで見てきた追加のバリデーションとメタデータと同じパラメータを共有しています。
    
    !!! note "技術詳細"
        `fastapi`から`Query`、`Path`などをインポートすると、これらは実際には関数です。
    
        呼び出されると、同じ名前のクラスのインスタンスを返します。
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 15 15:46:32 GMT 2024
    - 6.1K bytes
    - Viewed (0)
Back to top