Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 98 for Decorator (0.07 sec)

  1. docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

    In some cases you don't really need the return value of a dependency inside your *path operation function*.
    
    Or the dependency doesn't return a value.
    
    But you still need it to be executed/solved.
    
    For those cases, instead of declaring a *path operation function* parameter with `Depends`, you can add a `list` of `dependencies` to the *path operation decorator*.
    
    ## Add `dependencies` to the *path operation decorator*
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4K bytes
    - Viewed (0)
  2. tests/test_dependency_overrides.py

        response = client.get("/decorator-depends/?q=foo")
        assert response.status_code == 200
        assert response.json() == {"in": "decorator-depends"}
    
    
    def test_decorator_depends_q_foo_skip_100_limit_200():
        response = client.get("/decorator-depends/?q=foo&skip=100&limit=200")
        assert response.status_code == 200
        assert response.json() == {"in": "decorator-depends"}
    
    
    def test_router_depends():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/first-steps.md

    You put it on top of a function. Like a pretty decorative hat (I guess that's where the term came from).
    
    A "decorator" takes the function below and does something with it.
    
    In our case, this decorator tells **FastAPI** that the function below corresponds to the **path** `/` with an **operation** `get`.
    
    It is the "**path operation decorator**".
    
    ///
    
    You can also use the other operations:
    
    * `@app.post()`
    * `@app.put()`
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 26 11:48:16 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  4. docs/vi/docs/tutorial/first-steps.md

    Bạn đặt nó trên một hàm. Giống như một chiếc mũ xinh xắn (Tôi ddonas đó là lí do mà thuật ngữ này ra đời).
    
    Một "decorator" lấy một hàm bên dưới và thực hiện một vài thứ với nó.
    
    Trong trường hợp của chúng ta, decorator này nói **FastAPI** rằng hàm bên dưới ứng với **đường dẫn** `/` và một **toán tử** `get`.
    
    Nó là một "**decorator đường dẫn toán tử**".
    
    ///
    
    Bạn cũng có thể sử dụng với các toán tử khác:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/custom-response.md

    But you can also declare the `Response` that you want to be used (e.g. any `Response` subclass), in the *path operation decorator* using the `response_class` parameter.
    
    The contents that you return from your *path operation function* will be put inside of that `Response`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 12K bytes
    - Viewed (0)
  6. istioctl/pkg/proxyconfig/testdata/config_dump.json

                                          "grpc_timeout_header_max": "0s"
                                        }
                                      },
                                      "decorator": {
                                        "operation": ":8000/*"
                                      },
                                      "name": "default"
                                    }
                                  ]
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Jan 03 23:08:06 UTC 2024
    - 54.8K bytes
    - Viewed (0)
  7. istioctl/pkg/writer/envoy/configdump/testdata/routes/k8s-gateway-http-route-path-prefix/configdump.json

                "istio": {
                 "config": "/apis/networking.istio.io/v1/namespaces/default/virtual-service/http-0-istio-autogenerated-k8s-gateway"
                }
               }
              },
              "decorator": {
               "operation": "httpbin.default.svc.cluster.local:8000/*"
              },
              "name": "default.http.0"
             }
            ],
            "include_request_attempt_count": true
           }
          ],
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Aug 08 20:44:50 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/path-operation-configuration.md

    # Path Operation Configuration
    
    There are several parameters that you can pass to your *path operation decorator* to configure it.
    
    /// warning
    
    Notice that these parameters are passed directly to the *path operation decorator*, not to your *path operation function*.
    
    ///
    
    ## Response Status Code
    
    You can define the (HTTP) `status_code` to be used in the response of your *path operation*.
    
    You can pass directly the `int` code, like `404`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  9. istioctl/pkg/writer/envoy/configdump/testdata/routes/istio-gateway-http-route-prefix/configdump.json

               "filter_metadata": {
                "istio": {
                 "config": "/apis/networking.istio.io/v1/namespaces/default/virtual-service/httpbin"
                }
               }
              },
              "decorator": {
               "operation": "httpbin.default.svc.cluster.local:8000/get*"
              }
             }
            ],
            "include_request_attempt_count": true
           }
          ],
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Aug 08 20:44:50 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  10. docs/tr/docs/tutorial/first-steps.md

    * `/` yoluna gelen istekler
    
    /// info | "`@decorator` Bilgisi"
    
    Python'da `@something` sözdizimi "<abbr title="Decorator">dekoratör</abbr>" olarak adlandırılır.
    
    Dekoratörler, dekoratif bir şapka gibi (sanırım terim buradan geliyor) fonksiyonların üzerlerine yerleştirilirler.
    
    Bir "dekoratör" hemen altında bulunan fonksiyonu alır ve o fonksiyon ile bazı işlemler gerçekleştirir.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.5K bytes
    - Viewed (0)
Back to top