Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for init (0.14 sec)

  1. fastapi/params.py

            use_kwargs = {k: v for k, v in kwargs.items() if v is not _Unset}
    
            super().__init__(**use_kwargs)
    
        def __repr__(self) -> str:
            return f"{self.__class__.__name__}({self.default})"
    
    
    class Path(Param):
        in_ = ParamTypes.path
    
        def __init__(
            self,
            default: Any = ...,
            *,
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 27.5K bytes
    - Viewed (1)
  2. fastapi/security/oauth2.py

        group and organize permissions, you could do it as well in your application, just
        know that that it is application specific, it's not part of the specification.
        """
    
        def __init__(
            self,
            *,
            grant_type: Annotated[
                Union[str, None],
                Form(pattern="password"),
                Doc(
                    """
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  3. fastapi/security/http.py

            str,
            Doc(
                """
                The HTTP authorization credentials extracted from the header value.
                """
            ),
        ]
    
    
    class HTTPBase(SecurityBase):
        def __init__(
            self,
            *,
            scheme: str,
            scheme_name: Optional[str] = None,
            description: Optional[str] = None,
            auto_error: bool = True,
        ):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 15:29:38 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  4. fastapi/openapi/docs.py

        html += """
        presets: [
            SwaggerUIBundle.presets.apis,
            SwaggerUIBundle.SwaggerUIStandalonePreset
            ],
        })"""
    
        if init_oauth:
            html += f"""
            ui.initOAuth({json.dumps(jsonable_encoder(init_oauth))})
            """
    
        html += """
        </script>
        </body>
        </html>
        """
        return HTMLResponse(html)
    
    
    def get_redoc_html(
    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)
  5. fastapi/_compat.py

            @property
            def default(self) -> Any:
                return self.get_default()
    
            @property
            def type_(self) -> Any:
                return self.field_info.annotation
    
            def __post_init__(self) -> None:
                self._type_adapter: TypeAdapter[Any] = TypeAdapter(
                    Annotated[self.field_info.annotation, self.field_info]
                )
    
            def get_default(self) -> Any:
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  6. tests/test_path.py

            }
        )
    
    
    def test_path_param_le_int_3():
        response = client.get("/path/param-le-int/3")
        assert response.status_code == 200
        assert response.json() == 3
    
    
    def test_path_param_le_int_2():
        response = client.get("/path/param-le-int/2")
        assert response.status_code == 200
        assert response.json() == 2
    
    
    def test_path_param_le_int_2_7():
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 34.4K bytes
    - Viewed (0)
  7. fastapi/encoders.py

    # Taken from Pydantic v1 as is
    # TODO: pv2 should this return strings instead?
    def decimal_encoder(dec_value: Decimal) -> Union[int, float]:
        """
        Encodes a Decimal as int of there's no exponent, otherwise float
    
        This is useful when we use ConstrainedDecimal to represent Numeric(x,0)
        where a integer (but not int typed) is used. Encoding this as a float
        results in failed round-tripping between encode and parse.
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  8. tests/test_query.py

                    }
                ]
            }
        )
    
    
    def test_query_int_query_42():
        response = client.get("/query/int?query=42")
        assert response.status_code == 200
        assert response.json() == "foo bar 42"
    
    
    def test_query_int_query_42_5():
        response = client.get("/query/int?query=42.5")
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  9. fastapi/openapi/models.py

        maxLength: Optional[int] = Field(default=None, ge=0)
        minLength: Optional[int] = Field(default=None, ge=0)
        pattern: Optional[str] = None
        maxItems: Optional[int] = Field(default=None, ge=0)
        minItems: Optional[int] = Field(default=None, ge=0)
        uniqueItems: Optional[bool] = None
        maxContains: Optional[int] = Field(default=None, ge=0)
        minContains: Optional[int] = Field(default=None, ge=0)
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 22:49:33 GMT 2024
    - 15K bytes
    - Viewed (0)
  10. ci/official/utilities/extract_resultstore_links.py

    form of JUnit-based XML.
    """
    import argparse
    import datetime
    import os
    import re
    from typing import Dict, Union
    import xml.etree.ElementTree as ElemTree
    
    
    ResultDictType = Dict[str, Dict[str, Union[str, int]]]
    
    RESULT_STORE_LINK_RE = re.compile(
        r'^INFO: Streaming build results to: (https://[\w./\-]+)')
    FAILED_BUILD_LINE = 'FAILED: Build did NOT complete successfully'
    BUILD_STATUS_LINE = 'INFO: Build'
    Python
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Nov 08 17:50:27 GMT 2023
    - 10.9K bytes
    - Viewed (0)
Back to top