Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for Reedy (0.21 sec)

  1. tests/test_tutorial/test_query_params/test_tutorial005.py

    from docs_src.query_params.tutorial005 import app
    
    client = TestClient(app)
    
    
    def test_foo_needy_very():
        response = client.get("/items/foo?needy=very")
        assert response.status_code == 200
        assert response.json() == {"item_id": "foo", "needy": "very"}
    
    
    def test_foo_no_needy():
        response = client.get("/items/foo")
        assert response.status_code == 422
        assert response.json() == IsDict(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_query_params/test_tutorial006_py310.py

        return c
    
    
    @needs_py310
    def test_foo_needy_very(client: TestClient):
        response = client.get("/items/foo?needy=very")
        assert response.status_code == 200
        assert response.json() == {
            "item_id": "foo",
            "needy": "very",
            "skip": 0,
            "limit": None,
        }
    
    
    @needs_py310
    def test_foo_no_needy(client: TestClient):
        response = client.get("/items/foo?skip=a&limit=b")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  3. docs/ja/docs/tutorial/query-params.md

    {!../../../docs_src/query_params/tutorial005.py!}
    ```
    
    ここで、クエリパラメータ `needy` は `str` 型の必須のクエリパラメータです
    
    以下のURLをブラウザで開くと:
    
    ```
    http://127.0.0.1:8000/items/foo-item
    ```
    
    ...必須のパラメータ `needy` を加えなかったので、以下の様なエラーが表示されます:
    
    ```JSON
    {
        "detail": [
            {
                "loc": [
                    "query",
                    "needy"
                ],
                "msg": "field required",
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_query_params/test_tutorial006.py

        c = TestClient(app)
        return c
    
    
    def test_foo_needy_very(client: TestClient):
        response = client.get("/items/foo?needy=very")
        assert response.status_code == 200
        assert response.json() == {
            "item_id": "foo",
            "needy": "very",
            "skip": 0,
            "limit": None,
        }
    
    
    def test_foo_no_needy(client: TestClient):
        response = client.get("/items/foo?skip=a&limit=b")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/query-params.md

            "needy"
          ],
          "msg": "Field required",
          "input": null,
          "url": "https://errors.pydantic.dev/2.1/v/missing"
        }
      ]
    }
    ```
    
    As `needy` is a required parameter, you would need to set it in the URL:
    
    ```
    http://127.0.0.1:8000/items/foo-item?needy=sooooneedy
    ```
    
    ...this would work:
    
    ```JSON
    {
        "item_id": "foo-item",
        "needy": "sooooneedy"
    }
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Oct 20 09:08:42 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  6. docs/fr/docs/tutorial/query-params.md

    ```
    
    Ici le paramètre `needy` est un paramètre requis (ou obligatoire) de type `str`.
    
    Si vous ouvrez une URL comme :
    
    ```
    http://127.0.0.1:8000/items/foo-item
    ```
    
    ...sans ajouter le paramètre requis `needy`, vous aurez une erreur :
    
    ```JSON
    {
        "detail": [
            {
                "loc": [
                    "query",
                    "needy"
                ],
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Sep 27 20:52:31 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  7. docs_src/query_params/tutorial006.py

    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_user_item(
        item_id: str, needy: str, skip: int = 0, limit: Union[int, None] = None
    ):
        item = {"item_id": item_id, "needy": needy, "skip": skip, "limit": limit}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 301 bytes
    - Viewed (0)
  8. docs/tr/docs/tutorial/query-params.md

          "loc": [
            "query",
            "needy"
          ],
          "msg": "Field required",
          "input": null,
          "url": "https://errors.pydantic.dev/2.1/v/missing"
        }
      ]
    }
    ```
    
    `needy` zorunlu bir parametre olduğundan dolayı bağlantıda tanımlanması gerekir:
    
    ```
    http://127.0.0.1:8000/items/foo-item?needy=sooooneedy
    ```
    
    ...bu iş görür:
    
    ```JSON
    {
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  9. docs/es/docs/tutorial/query-params.md

    ```
    
    Aquí el parámetro de query `needy` es un parámetro de query requerido, del tipo `str`.
    
    Si abres tu navegador en una URL como:
    
    ```
    http://127.0.0.1:8000/items/foo-item
    ```
    
    ...sin añadir el parámetro `needy` requerido, verás un error como:
    
    ```JSON
    {
        "detail": [
            {
                "loc": [
                    "query",
                    "needy"
                ],
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  10. docs/pt/docs/tutorial/query-params.md

    ```
    
    Aqui o parâmetro de consulta `needy` é um valor obrigatório, do tipo `str`.
    
    Se você abrir no seu navegador a URL:
    
    ```
    http://127.0.0.1:8000/items/foo-item
    ```
    
    ... sem adicionar o parâmetro obrigatório `needy`, você verá um erro como:
    
    ```JSON
    {
        "detail": [
            {
                "loc": [
                    "query",
                    "needy"
                ],
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.6K bytes
    - Viewed (0)
Back to top