Search Options

Results per page
Sort
Preferred Languages
Advance

Results 661 - 670 of 1,405 for punt (0.03 sec)

  1. docs_src/additional_status_codes/tutorial001.py

    from fastapi import Body, FastAPI, status
    from fastapi.responses import JSONResponse
    
    app = FastAPI()
    
    items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}}
    
    
    @app.put("/items/{item_id}")
    async def upsert_item(
        item_id: str,
        name: Union[str, None] = Body(default=None),
        size: Union[int, None] = Body(default=None),
    ):
        if item_id in items:
            item = items[item_id]
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 684 bytes
    - Viewed (0)
  2. docs_src/additional_status_codes/tutorial001_an_py310.py

    from fastapi import Body, FastAPI, status
    from fastapi.responses import JSONResponse
    
    app = FastAPI()
    
    items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}}
    
    
    @app.put("/items/{item_id}")
    async def upsert_item(
        item_id: str,
        name: Annotated[str | None, Body()] = None,
        size: Annotated[int | None, Body()] = None,
    ):
        if item_id in items:
            item = items[item_id]
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 686 bytes
    - Viewed (0)
  3. docs_src/body_multiple_params/tutorial001_an_py39.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)],
        q: Union[str, None] = None,
        item: Union[Item, None] = None,
    ):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 610 bytes
    - Viewed (0)
  4. cmd/metrics-v3-bucket-replication.go

    		bucketL)
    	bucketReplProxiedPutTaggingRequestsFailuresMD = NewCounterMD(bucketReplProxiedPutTaggingRequestsFailures,
    		"Number of failures in PUT tagging requests proxied to replication target",
    		bucketL)
    	bucketReplProxiedPutTaggingRequestsTotalMD = NewCounterMD(bucketReplProxiedPutTaggingRequestsTotal,
    		"Number of PUT tagging requests proxied to replication target",
    		bucketL)
    	bucketReplSentBytesMD = NewCounterMD(bucketReplSentBytes,
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 15 12:04:40 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/fess/app/web/api/admin/dataconfig/ApiAdminDataconfigAction.java

                return null;
            })).status(Status.OK).result());
        }
    
        // PUT /api/admin/dataconfig/setting
        @Execute
        public JsonResponse<ApiResult> put$setting(final CreateBody body) {
            validateApi(body, messages -> {});
            body.crudMode = CrudMode.CREATE;
            final DataConfig dataConfig = getDataConfig(body).map(entity -> {
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 7K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/fess/app/web/api/admin/dict/synonym/ApiAdminDictSynonymAction.java

                        return null;
                    })).status(ApiResult.Status.OK).result());
        }
    
        // PUT /api/admin/dict/synonym/setting/{dictId}
        @Execute
        public JsonResponse<ApiResult> put$setting(final String dictId, final CreateBody body) {
            body.dictId = dictId;
            validateApi(body, messages -> {});
            body.crudMode = CrudMode.CREATE;
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  7. fess-crawler/src/main/java/org/codelibs/fess/crawler/extractor/impl/HtmlXpathExtractor.java

            }
    
            featureMap.put(key, value);
        }
    
        public void addProperty(final String key, final String value) {
            if (StringUtil.isBlank(key) || StringUtil.isBlank(value)) {
                throw new CrawlerSystemException("key or value is null.");
            }
    
            propertyMap.put(key, value);
        }
    
        public Map<String, String> getFeatureMap() {
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Feb 22 01:47:32 UTC 2024
    - 7K bytes
    - Viewed (0)
  8. docs/vi/docs/index.md

        * Swagger UI.
        * ReDoc.
    
    ---
    
    Quay trở lại ví dụ trước, **FastAPI** sẽ thực hiện:
    
    * Kiểm tra xem có một `item_id` trong đường dẫn với các request `GET` và `PUT` không?
    * Kiểm tra xem `item_id` có phải là kiểu `int` trong các request `GET` và `PUT` không?
        * Nếu không, client sẽ thấy một lỗi rõ ràng và hữu ích.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 20 19:20:23 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  9. docs/zh/docs/index.md

    ---
    
    回到前面的代码示例,**FastAPI** 将会:
    
    * 校验 `GET` 和 `PUT` 请求的路径中是否含有 `item_id`。
    * 校验 `GET` 和 `PUT` 请求中的 `item_id` 是否为 `int` 类型。
        * 如果不是,客户端将会收到清晰有用的错误信息。
    * 检查 `GET` 请求中是否有命名为 `q` 的可选查询参数(比如 `http://127.0.0.1:8000/items/foo?q=somequery`)。
        * 因为 `q` 被声明为 `= None`,所以它是可选的。
        * 如果没有 `None` 它将会是必需的 (如 `PUT` 例子中的请求体)。
    * 对于访问 `/items/{item_id}` 的 `PUT` 请求,将请求体读取为 JSON 并:
        * 检查是否有必需属性 `name` 并且值为 `str` 类型 。
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 20 19:20:23 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  10. docs_src/body_nested_models/tutorial001_py310.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
        tags: list = []
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item):
        results = {"item_id": item_id, "item": item}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 364 bytes
    - Viewed (0)
Back to top