Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for func (0.19 sec)

  1. tests/test_ws_router.py

            with client.websocket_connect("/no-router/"):
                pass  # pragma: no cover
        assert e.value.code == status.WS_1000_NORMAL_CLOSURE
    
    
    def websocket_middleware(middleware_func):
        """
        Helper to create a Starlette pure websocket middleware
        """
    
        def middleware_constructor(app):
            @functools.wraps(app)
            async def wrapped_app(scope, receive, send):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  2. docs/ru/docs/tutorial/dependencies/index.md

        ```
    
    `Depends` работает немного иначе. Вы передаёте в `Depends` одиночный параметр, который будет похож на функцию.
    
    Вы **не вызываете его** на месте (не добавляете скобочки в конце: 👎 *your_best_func()*👎), просто передаёте как параметр в `Depends()`.
    
    И потом функция берёт параметры так же, как *функция обработки пути*.
    
    !!! tip "Подсказка"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 17.7K bytes
    - Viewed (0)
  3. fastapi/background.py

            background_tasks.add_task(write_notification, email, message="some notification")
            return {"message": "Notification sent in the background"}
        ```
        """
    
        def add_task(
            self,
            func: Annotated[
                Callable[P, Any],
                Doc(
                    """
                    The function to call 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)
  4. docs/hu/docs/index.md

    ---
    
    "_I’m over the moon excited about **FastAPI**. It’s so fun!_"
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 20.2K bytes
    - Viewed (0)
  5. docs/es/docs/index.md

    ---
    
    "_I’m over the moon excited about **FastAPI**. It’s so fun!_"
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19K bytes
    - Viewed (0)
  6. fastapi/applications.py

                    **Example**
    
                    ```python
                    from fastapi import Depends, FastAPI
    
                    from .dependencies import func_dep_1, func_dep_2
    
                    app = FastAPI(dependencies=[Depends(func_dep_1), Depends(func_dep_2)])
                    ```
                    """
                ),
            ] = None,
            default_response_class: Annotated[
                Type[Response],
    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)
  7. docs_src/dataclasses/tutorial003.py

            {
                "name": "Breaters",
                "items": [
                    {
                        "name": "Island In The Moon",
                        "description": "A place to be be playin' and havin' fun",
                    },
                    {"name": "Holy Buddies"},
                ],
            },
            {
                "name": "System of an Up",
                "items": [
                    {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1.4K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_dataclasses/test_tutorial002.py

        assert response.status_code == 200
        assert response.json() == {
            "name": "Island In The Moon",
            "price": 12.99,
            "description": "A place to be be playin' and havin' fun",
            "tags": ["breater"],
            "tax": None,
        }
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200
        assert response.json() == {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  9. fastapi/routing.py

        ) -> Callable[[DecoratedCallable], DecoratedCallable]:
            def decorator(func: DecoratedCallable) -> DecoratedCallable:
                self.add_route(
                    path,
                    func,
                    methods=methods,
                    name=name,
                    include_in_schema=include_in_schema,
                )
                return func
    
            return decorator
    
        def add_api_route(
            self,
    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)
  10. docs/he/docs/index.md

    ---
    
    "_I’m over the moon excited about **FastAPI**. It’s so fun!_"
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 21.2K bytes
    - Viewed (0)
Back to top