Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 7421 - 7430 of 7,804 for RETURN (0.04 seconds)

  1. docs/zh/docs/tutorial/first-steps.md

    你也可以将其定义为常规函数而不使用 `async def`:
    
    {* ../../docs_src/first_steps/tutorial003_py310.py hl[7] *}
    
    /// note
    
    如果你不知道两者的区别,请查阅 [并发: *赶时间吗?*](../async.md#in-a-hurry)。
    
    ///
    
    ### 步骤 5:返回内容 { #step-5-return-the-content }
    
    {* ../../docs_src/first_steps/tutorial001_py310.py hl[8] *}
    
    你可以返回一个 `dict`、`list`,像 `str`、`int` 一样的单个值,等等。
    
    你还可以返回 Pydantic 模型(稍后你将了解更多)。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 13.3K bytes
    - Click Count (0)
  2. docs/tr/docs/tutorial/response-model.md

    <img src="/img/tutorial/response-model/image02.png">
    
    ## Diğer Return Type Annotation’ları { #other-return-type-annotations }
    
    Bazı durumlarda Pydantic field olarak geçerli olmayan bir şey döndürebilir ve bunu fonksiyonda annotate edebilirsiniz; amaç sadece araçların (editör, mypy vb.) sağladığı desteği almaktır.
    
    ### Doğrudan Response Döndürmek { #return-a-response-directly }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 17K bytes
    - Click Count (0)
  3. docs/tr/docs/how-to/general.md

    Döndürmeniz gerekenden daha fazla veri döndürmediğinizden emin olmak için, [Tutorial - Response Model - Return Type](../tutorial/response-model.md) dokümantasyonunu okuyun.
    
    ## Response Performansını Optimize Etme - Response Model - Return Type { #optimize-response-performance-response-model-return-type }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 3.2K bytes
    - Click Count (0)
  4. tests/test_enforce_once_required_parameter.py

        return f"{client_id}_key"
    
    
    def _get_client_tag(client_id: str | None = Query(None)) -> str | None:
        if client_id is None:
            return None
        return f"{client_id}_tag"
    
    
    @app.get("/foo")
    def foo_handler(
        client_key: str = Depends(_get_client_key),
        client_tag: str | None = Depends(_get_client_tag),
    ):
        return {"client_id": client_key, "client_tag": client_tag}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  5. CHANGELOG/CHANGELOG-1.16.md

    * Return error when the scoring plugin returns score out of range [0, 100]. ([#81015](https://github.com/kubernetes/kubernetes/pull/81015), [@draveness](https://github.com/draveness))
    * Update to use go 1.12.8 ([#81390](https://github.com/kubernetes/kubernetes/pull/81390), [@cblecker](https://github.com/cblecker))
    Created: Fri Apr 03 09:05:14 GMT 2026
    - Last Modified: Wed Oct 23 20:13:20 GMT 2024
    - 345.2K bytes
    - Click Count (0)
  6. docs_src/generate_clients/tutorial003_py310.py

    async def create_item(item: Item):
        return {"message": "Item received"}
    
    
    @app.get("/items/", response_model=list[Item], tags=["items"])
    async def get_items():
        return [
            {"name": "Plumbus", "price": 3},
            {"name": "Portal Gun", "price": 9001},
        ]
    
    
    @app.post("/users/", response_model=ResponseMessage, tags=["users"])
    async def create_user(user: User):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 914 bytes
    - Click Count (0)
  7. docs_src/path_params/tutorial005_py310.py

    @app.get("/models/{model_name}")
    async def get_model(model_name: ModelName):
        if model_name is ModelName.alexnet:
            return {"model_name": model_name, "message": "Deep Learning FTW!"}
    
        if model_name.value == "lenet":
            return {"model_name": model_name, "message": "LeCNN all the images"}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 546 bytes
    - Click Count (0)
  8. tests/test_response_model_include_exclude.py

    )
    def simple_include():
        return Model2(
            ref=Model1(foo="simple_include model foo", bar="simple_include model bar"),
            baz="simple_include model2 baz",
        )
    
    
    @app.get(
        "/simple_include_dict",
        response_model=Model2,
        response_model_include={"baz": ..., "ref": {"foo"}},
    )
    def simple_include_dict():
        return {
            "ref": {
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Jul 19 19:14:58 GMT 2021
    - 4K bytes
    - Click Count (0)
  9. docs_src/extending_openapi/tutorial001_py310.py

    from fastapi import FastAPI
    from fastapi.openapi.utils import get_openapi
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items():
        return [{"name": "Foo"}]
    
    
    def custom_openapi():
        if app.openapi_schema:
            return app.openapi_schema
        openapi_schema = get_openapi(
            title="Custom title",
            version="2.5.0",
            summary="This is a very custom OpenAPI schema",
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 737 bytes
    - Click Count (0)
  10. tests/test_request_param_model_by_alias.py

    
    @app.get("/query")
    async def query_model(data: Model = Query()):
        return {"param": data.param}
    
    
    @app.get("/header")
    async def header_model(data: Model = Header()):
        return {"param": data.param}
    
    
    @app.get("/cookie")
    async def cookie_model(data: Model = Cookie()):
        return {"param": data.param}
    
    
    def test_query_model_with_alias():
        client = TestClient(app)
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 2.1K bytes
    - Click Count (0)
Back to Top