Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 88 for Khalid (0.28 sec)

  1. docs/en/docs/tutorial/body-nested-models.md

        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="4  10"
        {!> ../../../docs_src/body_nested_models/tutorial005.py!}
        ```
    
    The string will be checked to be a valid URL, and documented in JSON Schema / OpenAPI as such.
    
    ## Attributes with lists of submodels
    
    You can also use Pydantic models as subtypes of `list`, `set`, etc.:
    
    === "Python 3.10+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/query-params-str-validations.md

    FastAPI will now:
    
    * **Validate** the data making sure that the max length is 50 characters
    * Show a **clear error** for the client when the data is not valid
    * **Document** the parameter in the OpenAPI schema *path operation* (so it will show up in the **automatic docs UI**)
    
    ## Alternative (old) `Query` as the default value
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 25.7K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_body_multiple_params/test_tutorial003_an_py310.py

    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_multiple_params.tutorial003_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_post_body_valid(client: TestClient):
        response = client.put(
            "/items/5",
            json={
                "importance": 2,
                "item": {"name": "Foo", "price": 50.5},
                "user": {"username": "Dave"},
            },
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/websockets.md

        You can use a closing code from the <a href="https://tools.ietf.org/html/rfc6455#section-7.4.1" class="external-link" target="_blank">valid codes defined in the specification</a>.
    
    ### Try the WebSockets with dependencies
    
    If your file is named `main.py`, run your application with:
    
    <div class="termy">
    
    ```console
    $ fastapi dev main.py
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/extra-models.md

    ## Response with arbitrary `dict`
    
    You can also declare a response using a plain arbitrary `dict`, declaring just the type of the keys and values, without using a Pydantic model.
    
    This is useful if you don't know the valid field/attribute names (that would be needed for a Pydantic model) beforehand.
    
    In this case, you can use `typing.Dict` (or just `dict` in Python 3.9 and above):
    
    === "Python 3.9+"
    
        ```Python hl_lines="6"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (1)
  6. docs/es/docs/tutorial/path-params.md

    ```JSON
    {
        "detail": [
            {
                "loc": [
                    "path",
                    "item_id"
                ],
                "msg": "value is not a valid integer",
                "type": "type_error.integer"
            }
        ]
    }
    ```
    
    debido a que el parámetro de path `item_id` tenía el valor `"foo"`, que no es un `int`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  7. docs/pt/docs/tutorial/path-params.md

    ```JSON
    {
        "detail": [
            {
                "loc": [
                    "path",
                    "item_id"
                ],
                "msg": "value is not a valid integer",
                "type": "type_error.integer"
            }
        ]
    }
    ```
    
    devido ao parâmetro da rota `item_id` ter um valor `"foo"`, que não é um `int`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.7K bytes
    - Viewed (0)
  8. docs/ko/docs/tutorial/path-params.md

    ```JSON
    {
        "detail": [
            {
                "loc": [
                    "path",
                    "item_id"
                ],
                "msg": "value is not a valid integer",
                "type": "type_error.integer"
            }
        ]
    }
    ```
    
    경로 매개변수 `item_id`는 `int`가 아닌 `"foo"` 값이기 때문입니다.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  9. docs/em/docs/python-types.md

    ```Python
    say_hi()  # Oh, no, this throws an error! 😱
    ```
    
    `name` 🔢 **✔** (🚫 *📦*) ↩️ ⚫️ 🚫 ✔️ 🔢 💲. , `name` 🚫 `None` 💲:
    
    ```Python
    say_hi(name=None)  # This works, None is valid 🎉
    ```
    
    👍 📰, 🕐 👆 🔛 🐍 3️⃣.1️⃣0️⃣ 👆 🏆 🚫 ✔️ 😟 🔃 👈, 👆 🔜 💪 🎯 ⚙️ `|` 🔬 🇪🇺 🆎:
    
    ```Python hl_lines="1  4"
    {!../../../docs_src/python_types/tutorial009c_py310.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  10. tests/test_serialize_response_model.py

    
    class Item(BaseModel):
        name: str = Field(alias="aliased_name")
        price: Optional[float] = None
        owner_ids: Optional[List[int]] = None
    
    
    @app.get("/items/valid", response_model=Item)
    def get_valid():
        return Item(aliased_name="valid", price=1.0)
    
    
    @app.get("/items/coerce", response_model=Item)
    def get_coerce():
        return Item(aliased_name="coerce", price="1.0")
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 4.2K bytes
    - Viewed (0)
Back to top