Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for function (0.26 sec)

  1. tests/test_generate_unique_id_function.py

        app = FastAPI(generate_unique_id_function=custom_generate_unique_id)
        router = APIRouter(generate_unique_id_function=custom_generate_unique_id2)
    
        @app.post(
            "/",
            response_model=List[Item],
            responses={404: {"model": List[Message]}},
            generate_unique_id_function=custom_generate_unique_id3,
        )
        def post_root(item1: Item, item2: Item):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jan 13 15:10:26 GMT 2024
    - 66.7K bytes
    - Viewed (0)
  2. scripts/docs.py

        build_site_dist_path = build_site_path / lang
        if lang == "en":
            dist_path = site_path
            # Don't remove en dist_path as it might already contain other languages.
            # When running build_all(), that function already removes site_path.
            # All this is only relevant locally, on GitHub Actions all this is done through
            # artifacts and multiple workflows, so it doesn't matter if directories are
            # removed or not.
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 22 19:26:14 GMT 2024
    - 10.9K bytes
    - Viewed (1)
  3. fastapi/applications.py

                    """
                ),
            ] = None,
            generate_unique_id_function: Annotated[
                Callable[[routing.APIRoute], str],
                Doc(
                    """
                    Customize the function used to generate unique IDs for the *path
                    operations* shown in the generated OpenAPI.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
  4. fastapi/openapi/docs.py

                    qp = location.search.substring(1);
                }
    
                arr = qp.split("&");
                arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
                qp = qp ? JSON.parse('{' + arr.join() + '}',
                        function (key, value) {
                            return key === "" ? value : decodeURIComponent(value);
                        }
                ) : {};
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 10.1K bytes
    - Viewed (0)
  5. fastapi/routing.py

                    current_generate_unique_id = get_value_or_default(
                        route.generate_unique_id_function,
                        router.generate_unique_id_function,
                        generate_unique_id_function,
                        self.generate_unique_id_function,
                    )
                    self.add_api_route(
                        prefix + route.path,
                        route.endpoint,
    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)
  6. fastapi/openapi/utils.py

            operation["description"] = route.description
        operation_id = route.operation_id or route.unique_id
        if operation_id in operation_ids:
            message = (
                f"Duplicate Operation ID {operation_id} for function "
                + f"{route.endpoint.__name__}"
            )
            file_name = getattr(route.endpoint, "__globals__", {}).get("__file__")
            if file_name:
                message += f" at {file_name}"
    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)
  7. fastapi/background.py

                Doc(
                    """
                    The function to call after the response is sent.
    
                    It can be a regular `def` function or an `async def` function.
                    """
                ),
            ],
            *args: P.args,
            **kwargs: P.kwargs,
        ) -> None:
            """
            Add a function to be called in the background after the response is sent.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  8. fastapi/datastructures.py

    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
        needed for non-async code.
    
        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
    - 5.6K bytes
    - Viewed (0)
  9. fastapi/_compat.py

        try:
            from pydantic_core.core_schema import (
                with_info_plain_validator_function as with_info_plain_validator_function,
            )
        except ImportError:  # pragma: no cover
            from pydantic_core.core_schema import (
                general_plain_validator_function as with_info_plain_validator_function,  # noqa: F401
            )
    
        Required = PydanticUndefined
        Undefined = PydanticUndefined
    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)
  10. tensorflow/api_template.__init__.py

    """
    Top-level module of TensorFlow. By convention, we refer to this module as
    `tf` instead of `tensorflow`, following the common practice of importing
    TensorFlow via the command `import tensorflow as tf`.
    
    The primary function of this module is to import all of the public TensorFlow
    interfaces into a single place. The interfaces themselves are located in
    sub-modules, as described below.
    
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 05 06:27:59 GMT 2024
    - 6.7K bytes
    - Viewed (3)
Back to top