Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for define (0.24 sec)

  1. fastapi/security/api_key.py

        """
        API key authentication using a query parameter.
    
        This defines the name of the query parameter that should be provided in the request
        with the API key and integrates that into the OpenAPI documentation. It extracts
        the key value sent in the query parameter automatically and provides it as the
        dependency result. But it doesn't define how to send that API key to the client.
    
        ## Usage
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 23 22:29:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  2. fastapi/encoders.py

                if it should exclude from the output the fields that had the same default
                value, even when they were explicitly set.
                """
            ),
        ] = False,
        exclude_none: Annotated[
            bool,
            Doc(
                """
                Pydantic's `exclude_none` parameter, passed to Pydantic models to define
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  3. fastapi/routing.py

                    """
                ),
            ] = None,
            response_model_by_alias: Annotated[
                bool,
                Doc(
                    """
                    Configuration passed to Pydantic to define if the response model
                    should be serialized by alias when an alias is used.
    
                    Read more about it in the
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  4. fastapi/datastructures.py

    from starlette.datastructures import UploadFile as StarletteUploadFile
    from typing_extensions import Annotated, Doc
    
    
    class UploadFile(StarletteUploadFile):
        """
        A file uploaded in a request.
    
        Define it as a *path operation function* (or dependency) parameter.
    
        If you are using a regular `def` function, you can use the `upload_file.file`
        attribute to access the raw standard Python file (blocking, not async), useful and
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  5. fastapi/security/oauth2.py

                    )
                else:
                    return None  # pragma: nocover
            return param
    
    
    class SecurityScopes:
        """
        This is a special class that you can define in a parameter in a dependency to
        obtain the OAuth2 scopes required by all the dependencies in the same chain.
    
        This way, multiple dependencies can have different scopes, even when used in the
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  6. tests/main.py

        return ",".join(map(str, sorted(query)))
    
    
    @app.get("/query/list")
    def get_query_list(device_ids: List[int] = Query()) -> List[int]:
        return device_ids
    
    
    @app.get("/query/list-default")
    def get_query_list_default(device_ids: List[int] = Query(default=[])) -> List[int]:
    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)
  7. configure.py

      Returns:
        string of native cuda compute capabilities, separated by comma.
      """
      device_query_bin = os.path.join(
          environ_cp.get('CUDA_TOOLKIT_PATH'), 'extras/demo_suite/deviceQuery')
      if os.path.isfile(device_query_bin) and os.access(device_query_bin, os.X_OK):
        try:
          output = run_shell(device_query_bin).split('\n')
          pattern = re.compile('[0-9]*\\.[0-9]*')
    Python
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 18:25:36 GMT 2024
    - 53.8K bytes
    - Viewed (0)
  8. fastapi/utils.py

            new_field.key_field = create_cloned_field(  # type: ignore[attr-defined]
                field.key_field,  # type: ignore[attr-defined]
                cloned_types=cloned_types,
            )
        new_field.validators = field.validators  # type: ignore[attr-defined]
        new_field.pre_validators = field.pre_validators  # type: ignore[attr-defined]
        new_field.post_validators = field.post_validators  # type: ignore[attr-defined]
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  9. fastapi/param_functions.py

        validation_alias: Annotated[
            Union[str, None],
            Doc(
                """
                'Whitelist' validation step. The parameter field will be the single one
                allowed by the alias or set of aliases defined.
                """
            ),
        ] = None,
        serialization_alias: Annotated[
            Union[str, None],
            Doc(
                """
                'Blacklist' validation step. The vanilla parameter field will be the
    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)
  10. fastapi/_compat.py

            Required as Required,  # noqa: F401
        )
        from pydantic.fields import (  # type: ignore[no-redef,attr-defined]
            Undefined as Undefined,
        )
        from pydantic.fields import (  # type: ignore[no-redef, attr-defined]
            UndefinedType as UndefinedType,  # noqa: F401
        )
        from pydantic.schema import (
            field_schema,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
Back to top