class ListHomeItem
A class representing a SharePoint List Home Item, inheriting from ClientValue to provide entity type information for SharePoint list home operations.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/listhome/item.py
4 - 7
simple
Purpose
This class serves as a data model for SharePoint List Home Items within the Office365 Python SDK. It extends ClientValue to provide a specific entity type name used in SharePoint REST API operations. The class is primarily used for serialization/deserialization of list home item data when communicating with SharePoint services, allowing the SDK to properly identify and handle list home item entities in API requests and responses.
Source Code
class ListHomeItem(ClientValue):
@property
def entity_type_name(self):
return "Microsoft.SharePoint.ListHome.ListHomeItem"
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
__init__: Inherits constructor from ClientValue base class. The base class constructor typically accepts keyword arguments that map to the entity's properties, allowing initialization of the object with data from SharePoint API responses or for creating new entities to send to SharePoint.
Return Value
Instantiation returns a ListHomeItem object that represents a SharePoint list home item entity. The entity_type_name property returns the string 'Microsoft.SharePoint.ListHome.ListHomeItem', which is used internally by the Office365 SDK to identify the entity type in SharePoint API communications.
Class Interface
Methods
@property entity_type_name(self) -> str
property
Purpose: Returns the SharePoint entity type name identifier for ListHomeItem entities, used by the SDK for proper API communication and entity identification
Returns: A string containing the fully qualified entity type name 'Microsoft.SharePoint.ListHome.ListHomeItem'
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
entity_type_name |
str | Read-only property that returns the SharePoint entity type identifier 'Microsoft.SharePoint.ListHome.ListHomeItem' | instance |
Dependencies
office365
Required Imports
from office365.runtime.client_value import ClientValue
from office365.sharepoint.listhome.list_home_item import ListHomeItem
Usage Example
from office365.sharepoint.listhome.list_home_item import ListHomeItem
from office365.runtime.client_value import ClientValue
# Instantiate a ListHomeItem (typically done internally by the SDK)
list_home_item = ListHomeItem()
# Access the entity type name (used internally for API operations)
entity_type = list_home_item.entity_type_name
print(entity_type) # Output: Microsoft.SharePoint.ListHome.ListHomeItem
# In practice, this class is usually instantiated by the SDK when retrieving
# list home items from SharePoint, not directly by user code
# Example in context:
# ctx = ClientContext(site_url).with_credentials(credentials)
# list_home_items = ctx.web.list_home.get_list_home_items()
# ctx.execute_query()
# for item in list_home_items:
# # item would be a ListHomeItem instance
# print(item.entity_type_name)
Best Practices
- This class is typically instantiated by the Office365 SDK internally rather than directly by user code
- The entity_type_name property should not be modified as it identifies the specific SharePoint entity type
- When extending this class, ensure any additional properties align with SharePoint's ListHomeItem entity schema
- Use this class in conjunction with SharePoint ClientContext for proper authentication and API communication
- The class inherits from ClientValue which provides serialization capabilities for SharePoint REST API operations
- Do not instantiate this class directly unless you are implementing custom SharePoint operations; instead, retrieve instances through the SDK's query methods
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class SPListRule 68.6% similar
-
class ListItemFormUpdateValue 66.9% similar
-
class SharePointHomePageContext 66.6% similar
-
class HomeSitesDetails 66.1% similar
-
class ListItemVersionCollectionPosition 65.3% similar