class CreatableItemInfo
A data class representing information about a creatable item in SharePoint/Office 365, including what the item is and where to create it.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/lists/creatable_item_info.py
5 - 10
simple
Purpose
CreatableItemInfo serves as a data transfer object (DTO) that encapsulates metadata about items that can be created in SharePoint/Office 365. It inherits from ClientValue, making it part of the Office 365 REST API client framework. This class is used to store and transmit information needed to create documents or get edit links through the CreateDocument or CreateDocumentAndGetEditLink API methods. It acts as a structured container for creatable item metadata that can be serialized and sent to SharePoint services.
Source Code
class CreatableItemInfo(ClientValue):
"""
Information on a creatable item: what the item is and where to go to create it. Alternatively, the information
provided here can be used to call CreateDocument (section 3.2.5.79.2.2.9) or
CreateDocumentAndGetEditLink (section 3.2.5.79.2.1.13).
"""
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
bases: Inherits from ClientValue, which is the base class for client-side value objects in the Office 365 REST API framework. This provides serialization/deserialization capabilities and integration with the Office 365 client object model.
Return Value
Instantiation returns a CreatableItemInfo object that can hold metadata about a creatable item. As a ClientValue subclass, instances can be serialized to JSON for API calls and deserialized from API responses. The object itself doesn't return values but serves as a data container.
Class Interface
Dependencies
office365
Required Imports
from office365.runtime.client_value import ClientValue
Usage Example
from office365.runtime.client_value import ClientValue
from office365.sharepoint.listitems.creatable.item_info import CreatableItemInfo
# Instantiate the CreatableItemInfo object
item_info = CreatableItemInfo()
# Since this is a data class inheriting from ClientValue, it likely has properties
# that can be set to define the creatable item's metadata
# Typical usage would involve setting properties and passing to API methods:
# item_info.property_name = 'value'
# This object would then be used with CreateDocument or CreateDocumentAndGetEditLink methods
# context.web.create_document(item_info)
# or
# edit_link = context.web.create_document_and_get_edit_link(item_info)
Best Practices
- This class is a data container (DTO) and should be instantiated to hold metadata about creatable items before passing to document creation methods
- As a ClientValue subclass, instances are automatically serializable for REST API calls - do not manually serialize
- Properties should be set according to the SharePoint API requirements for the specific document type being created
- Typically used in conjunction with SharePoint context methods like CreateDocument or CreateDocumentAndGetEditLink
- The class follows the Office 365 REST API patterns and should be used within the office365 client framework
- Instances are immutable once passed to API methods - create new instances for different creatable items
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class CreatablesInfo 79.1% similar
-
class CreatableItemInfoCollection 79.1% similar
-
class ListItemCreationInformation 76.9% similar
-
class ContentTypeCreationInformation 72.7% similar
-
class ListItemCreationInformationUsingPath 72.2% similar