Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 316 for Updated (0.17 sec)

  1. docs_src/body_updates/tutorial002_py310.py

    
    @app.patch("/items/{item_id}", response_model=Item)
    async def update_item(item_id: str, item: Item):
        stored_item_data = items[item_id]
        stored_item_model = Item(**stored_item_data)
        update_data = item.dict(exclude_unset=True)
        updated_item = stored_item_model.copy(update=update_data)
        items[item_id] = jsonable_encoder(updated_item)
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1010 bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/body-updates.md

        {!> ../../../docs_src/body_updates/tutorial002_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="35"
        {!> ../../../docs_src/body_updates/tutorial002_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="35"
        {!> ../../../docs_src/body_updates/tutorial002.py!}
        ```
    
    ### Partial updates recap
    
    In summary, to apply partial updates you would:
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/testing-database.md

    # Testing a Database
    
    !!! info
        These docs are about to be updated. 🎉
    
        The current version assumes Pydantic v1, and SQLAlchemy versions less than 2.0.
    
        The new docs will include Pydantic v2 and will use <a href="https://sqlmodel.tiangolo.com/" class="external-link" target="_blank">SQLModel</a> (which is also based on SQLAlchemy) once it is updated to use Pydantic v2 as well.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3.5K bytes
    - Viewed (0)
  4. docs_src/body_updates/tutorial002.py

    
    @app.patch("/items/{item_id}", response_model=Item)
    async def update_item(item_id: str, item: Item):
        stored_item_data = items[item_id]
        stored_item_model = Item(**stored_item_data)
        update_data = item.dict(exclude_unset=True)
        updated_item = stored_item_model.copy(update=update_data)
        items[item_id] = jsonable_encoder(updated_item)
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1K bytes
    - Viewed (0)
  5. fastapi/_compat.py

    def _regenerate_error_with_loc(
        *, errors: Sequence[Any], loc_prefix: Tuple[Union[str, int], ...]
    ) -> List[Dict[str, Any]]:
        updated_loc_errors: List[Any] = [
            {**err, "loc": loc_prefix + err.get("loc", ())}
            for err in _normalize_errors(errors)
        ]
    
        return updated_loc_errors
    
    
    def _annotation_is_sequence(annotation: Union[Type[Any], None]) -> bool:
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  6. docs/en/mkdocs.maybe-insiders.yml

    # Define this here and not in the main mkdocs.yml file because that one is auto
    # updated and written, and the script would remove the env var
    INHERIT: !ENV [INSIDERS_FILE, '../en/mkdocs.no-insiders.yml']
    markdown_extensions:
      pymdownx.highlight:
    Others
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 16:23:02 GMT 2023
    - 285 bytes
    - Viewed (0)
  7. docs/en/overrides/main.html

            <span class="twemoji twitter">
              {% include ".icons/fontawesome/brands/twitter.svg" %}
            </span> Follow <strong>@fastapi</strong> on <strong>Twitter</strong> to stay updated
          </a>
        </div>
        <div class="item">
          <a class="announce-link" href="https://fastapi.tiangolo.com/newsletter/">
            <span class="twemoji">
              {% include ".icons/material/email.svg" %}
    HTML
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon Mar 25 23:10:11 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  8. docs_src/body_updates/tutorial002_py39.py

    
    @app.patch("/items/{item_id}", response_model=Item)
    async def update_item(item_id: str, item: Item):
        stored_item_data = items[item_id]
        stored_item_model = Item(**stored_item_data)
        update_data = item.dict(exclude_unset=True)
        updated_item = stored_item_model.copy(update=update_data)
        items[item_id] = jsonable_encoder(updated_item)
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1K bytes
    - Viewed (0)
  9. docs/en/docs/how-to/async-sql-encode-databases.md

    # ~~Async SQL (Relational) Databases with Encode/Databases~~ (deprecated)
    
    !!! info
        These docs are about to be updated. 🎉
    
        The current version assumes Pydantic v1.
    
        The new docs will include Pydantic v2 and will use <a href="https://sqlmodel.tiangolo.com/" class="external-link" target="_blank">SQLModel</a> once it is updated to use Pydantic v2 as well.
    
    !!! warning "Deprecated"
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  10. docs/en/docs/how-to/sql-databases-peewee.md

    Let's now see the file `sql_app/models.py`.
    
    ### Create Peewee models for our data
    
    Now create the Peewee models (classes) for `User` and `Item`.
    
    This is the same you would do if you followed the Peewee tutorial and updated the models to have the same data as in the SQLAlchemy tutorial.
    
    !!! tip
        Peewee also uses the term "**model**" to refer to these classes and instances that interact with the database.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 23.6K bytes
    - Viewed (0)
Back to top