Search Options

Results per page
Sort
Preferred Languages
Advance

Results 2431 - 2440 of 3,853 for qint (0.04 sec)

  1. docs/en/docs/tutorial/path-params.md

          "input": "foo",
          "url": "https://errors.pydantic.dev/2.1/v/int_parsing"
        }
      ]
    }
    ```
    
    because the path parameter `item_id` had a value of `"foo"`, which is not an `int`.
    
    The same error would appear if you provided a `float` instead of an `int`, as in: <a href="http://127.0.0.1:8000/items/4.2" class="external-link" target="_blank">http://127.0.0.1:8000/items/4.2</a>
    
    /// check
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  2. docs/es/docs/python-types.md

    Harías lo mismo para declarar `tuple`s y `set`s:
    
    ```Python hl_lines="1  4"
    {!../../docs_src/python_types/tutorial007.py!}
    ```
    
    Esto significa:
    
    * La variable `items_t` es un `tuple` con 3 ítems, un `int`, otro `int`, y un `str`.
    * La variable `items_s` es un `set` y cada uno de sus ítems es de tipo `bytes`.
    
    #### Diccionarios (Dicts)
    
    Para definir un `dict` le pasas 2 sub-tipos separados por comas.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  3. docs/es/docs/tutorial/path-params.md

                "type": "type_error.integer"
            }
        ]
    }
    ```
    
    debido a que el parámetro de path `item_id` tenía el valor `"foo"`, que no es un `int`.
    
    El mismo error aparecería si pasaras un `float` en vez de un `int` como en: <a href="http://127.0.0.1:8000/items/4.2" class="external-link" target="_blank">http://127.0.0.1:8000/items/4.2</a>
    
    /// check | Revisa
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  4. docs_src/path_params_numeric_validations/tutorial004_an_py39.py

    from typing import Annotated
    
    from fastapi import FastAPI, Path
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        item_id: Annotated[int, Path(title="The ID of the item to get", ge=1)], q: str
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 317 bytes
    - Viewed (0)
  5. docs/yo/docs/index.md

    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    
    
    @app.put("/items/{item_id}")
    def update_item(item_id: int, item: Item):
        return {"item_name": item.name, "item_id": item_id}
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 20 19:20:23 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  6. docs_src/python_types/tutorial008b.py

    from typing import Union
    
    
    def process_item(item: Union[int, str]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 84 bytes
    - Viewed (0)
  7. docs_src/path_params_numeric_validations/tutorial005_an_py39.py

    from typing import Annotated
    
    from fastapi import FastAPI, Path
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        item_id: Annotated[int, Path(title="The ID of the item to get", gt=0, le=1000)],
        q: str,
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 331 bytes
    - Viewed (0)
  8. cmd/bucket-replication-utils.go

    // BucketReplicationResyncStatus captures current replication resync status
    type BucketReplicationResyncStatus struct {
    	Version int `json:"version" msg:"v"`
    	// map of remote arn to their resync status for a bucket
    	TargetsMap map[string]TargetReplicationResyncStatus `json:"resyncMap,omitempty" msg:"brs"`
    	ID         int                                      `json:"id" msg:"id"`
    	LastUpdate time.Time                                `json:"lastUpdate" msg:"lu"`
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 15:31:51 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  9. docs/ja/docs/tutorial/path-params.md

                "msg": "value is not a valid integer",
                "type": "type_error.integer"
            }
        ]
    }
    ```
    
    これは、パスパラメータ `item_id` が `int` ではない値 `"foo"` だからです。
    
    <a href="http://127.0.0.1:8000/items/4.2" class="external-link" target="_blank">http://127.0.0.1:8000/items/4.2</a> で見られるように、intのかわりに `float` が与えられた場合にも同様なエラーが表示されます。
    
    /// check | "確認"
    
    したがって、Pythonの型宣言を使用することで、**FastAPI**はデータのバリデーションを行います。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/core/io/ResourceUtil.java

            File dir = null;
            final URL url = getResource(path);
            if ("file".equals(url.getProtocol())) {
                final int num = path.split("/").length;
                dir = new File(getFileName(url));
                for (int i = 0; i < num; ++i) {
                    dir = dir.getParentFile();
                }
            } else {
                dir = new File(JarFileUtil.toJarFilePath(url));
            }
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 15.8K bytes
    - Viewed (0)
Back to top