Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for LT (0.14 sec)

  1. tests/test_application.py

                                    }
                                },
                            },
                        },
                        "summary": "Get Path Param Lt",
                        "operationId": "get_path_param_lt_path_param_lt__item_id__get",
                        "parameters": [
                            {
                                "required": True,
                                "schema": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 52.2K bytes
    - Viewed (0)
  2. tests/main.py

    
    @app.get("/path/param-lt/{item_id}")
    def get_path_param_lt(item_id: float = Path(lt=3)):
        return item_id
    
    
    @app.get("/path/param-lt0/{item_id}")
    def get_path_param_lt0(item_id: float = Path(lt=0)):
        return item_id
    
    
    @app.get("/path/param-le/{item_id}")
    def get_path_param_le(item_id: float = Path(le=3)):
        return item_id
    
    
    @app.get("/path/param-lt-gt/{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)
  3. docs_src/path_params_numeric_validations/tutorial006.py

    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        *,
        item_id: int = Path(title="The ID of the item to get", ge=0, le=1000),
        q: str,
        size: float = Query(gt=0, lt=10.5),
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 10 18:49:18 GMT 2023
    - 345 bytes
    - Viewed (0)
  4. tests/test_ambiguous_params.py

                pass  # pragma: nocover
    
    
    def test_multiple_annotations():
        async def dep():
            pass  # pragma: nocover
    
        @app.get("/multi-query")
        async def get(foo: Annotated[int, Query(gt=2), Query(lt=10)]):
            return foo
    
        with pytest.raises(
            AssertionError,
            match=(
                "Cannot specify `Depends` in `Annotated` and default value"
                " together for 'foo'"
            ),
    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)
  5. fastapi/params.py

                default=default,
                default_factory=default_factory,
                alias=alias,
                title=title,
                description=description,
                gt=gt,
                ge=ge,
                lt=lt,
                le=le,
                min_length=min_length,
                max_length=max_length,
                discriminator=discriminator,
                multiple_of=multiple_of,
                allow_nan=allow_inf_nan,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 27.5K bytes
    - Viewed (1)
  6. tests/test_path.py

        assert response.status_code == 200
        assert response.json() == 2
    
    
    def test_path_param_lt_gt_2():
        response = client.get("/path/param-lt-gt/2")
        assert response.status_code == 200
        assert response.json() == 2
    
    
    def test_path_param_lt_gt_4():
        response = client.get("/path/param-lt-gt/4")
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 34.4K bytes
    - Viewed (0)
  7. fastapi/param_functions.py

            validation_alias=validation_alias,
            serialization_alias=serialization_alias,
            title=title,
            description=description,
            gt=gt,
            ge=ge,
            lt=lt,
            le=le,
            min_length=min_length,
            max_length=max_length,
            pattern=pattern,
            regex=regex,
            discriminator=discriminator,
            strict=strict,
    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)
  8. docs_src/path_params_numeric_validations/tutorial006_an.py

    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        *,
        item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)],
        q: str,
        size: Annotated[float, Query(gt=0, lt=10.5)],
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 405 bytes
    - Viewed (0)
  9. docs_src/path_params_numeric_validations/tutorial006_an_py39.py

    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        *,
        item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)],
        q: str,
        size: Annotated[float, Query(gt=0, lt=10.5)],
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 395 bytes
    - Viewed (0)
Back to top