class ListItemUpdateParameters
A parameter class for updating SharePoint list items, inheriting from ClientValue to represent client-side values in Office 365 operations.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/listitems/update_parameters.py
4 - 5
simple
Purpose
ListItemUpdateParameters serves as a data transfer object (DTO) for encapsulating parameters needed when updating SharePoint list items. It inherits from ClientValue, which provides serialization capabilities for client-server communication in the Office 365 SDK. This class acts as a container for update parameters that will be sent to SharePoint REST API endpoints.
Source Code
class ListItemUpdateParameters(ClientValue):
pass
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
bases: Inherits from ClientValue, which provides the base functionality for client-side value objects that can be serialized and sent to Office 365 services. ClientValue typically handles JSON serialization/deserialization and property management.
Return Value
Instantiation returns a ListItemUpdateParameters object that can be populated with properties and used as a parameter container for SharePoint list item update operations. The object inherits serialization methods from ClientValue that return JSON-compatible dictionaries.
Class Interface
Methods
__init__()
Purpose: Initializes a new ListItemUpdateParameters instance, inheriting initialization from ClientValue
Returns: A new ListItemUpdateParameters instance
set_property(name: str, value: any) -> ClientValue
Purpose: Sets a property value on the parameter object (inherited from ClientValue)
Parameters:
name: The name of the property to setvalue: The value to assign to the property
Returns: Returns self for method chaining
to_json() -> dict
Purpose: Serializes the parameter object to a JSON-compatible dictionary (inherited from ClientValue)
Returns: Dictionary representation of the object suitable for JSON serialization
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
properties |
dict | Dictionary storing all properties set on this parameter object (inherited from ClientValue) | instance |
Dependencies
office365
Required Imports
from office365.runtime.client_value import ClientValue
from office365.sharepoint.listitems.list_item_update_parameters import ListItemUpdateParameters
Usage Example
from office365.sharepoint.listitems.list_item_update_parameters import ListItemUpdateParameters
from office365.sharepoint.client_context import ClientContext
# Authenticate to SharePoint
ctx = ClientContext(site_url).with_credentials(user_credentials)
# Create update parameters
update_params = ListItemUpdateParameters()
# Set properties dynamically (inherited from ClientValue)
update_params.set_property('Title', 'Updated Title')
update_params.set_property('Description', 'Updated Description')
# Use with list item update operation
list_item = ctx.web.lists.get_by_title('MyList').get_item_by_id(1)
list_item.update(update_params)
ctx.execute_query()
Best Practices
- This class is typically used as a parameter container and should be instantiated before setting properties dynamically using inherited ClientValue methods
- Properties are usually set using set_property() method inherited from ClientValue rather than direct attribute assignment
- The class relies on ClientValue's serialization mechanism, so ensure all properties set are JSON-serializable
- Use this class in conjunction with SharePoint list item update operations within an authenticated ClientContext
- The empty class definition suggests it's meant to be a marker class that leverages all functionality from its parent ClientValue
- Always execute the query using ctx.execute_query() after setting up update operations to commit changes to SharePoint
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class ListItemDeleteParameters 78.7% similar
-
class GetListItemVersionsParameters 76.1% similar
-
class RenderListDataOverrideParameters 74.1% similar
-
class GetListsParameters 72.2% similar
-
class ListItemFormUpdateValue 71.2% similar