class BaseCustomProperty
BaseCustomProperty is a SharePoint entity class representing a base custom property in the SharePoint Publishing REST API.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/publishing/customproperties/base.py
4 - 7
simple
Purpose
This class serves as a base entity for custom properties in SharePoint Publishing. It inherits from the Entity class and provides the entity type name for REST API operations. It's used as a foundation for custom property objects that interact with SharePoint's Publishing REST API endpoints.
Source Code
class BaseCustomProperty(Entity):
@property
def entity_type_name(self):
return "Microsoft.SharePoint.Publishing.RestOnly.BaseCustomProperty"
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
Entity | - |
Parameter Details
bases: Inherits from Entity class which provides base functionality for SharePoint entities including REST API communication, property management, and entity lifecycle operations
Return Value
Instantiation returns a BaseCustomProperty object that represents a SharePoint Publishing custom property entity. The entity_type_name property returns the string 'Microsoft.SharePoint.Publishing.RestOnly.BaseCustomProperty' which identifies this entity type in SharePoint REST API calls.
Class Interface
Methods
@property entity_type_name(self) -> str
property
Purpose: Returns the SharePoint entity type name used for REST API operations
Returns: String 'Microsoft.SharePoint.Publishing.RestOnly.BaseCustomProperty' identifying this entity type in SharePoint REST API
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
entity_type_name |
str | Read-only property that returns the SharePoint REST API entity type identifier for this custom property class | instance |
Dependencies
office365
Required Imports
from office365.sharepoint.entity import Entity
from office365.sharepoint.publishing.base_custom_property import BaseCustomProperty
Usage Example
from office365.sharepoint.publishing.base_custom_property import BaseCustomProperty
from office365.sharepoint.client_context import ClientContext
# Authenticate with SharePoint
ctx = ClientContext(site_url).with_credentials(credentials)
# Instantiate the custom property
custom_property = BaseCustomProperty(ctx)
# Access the entity type name
entity_type = custom_property.entity_type_name
print(entity_type) # Output: Microsoft.SharePoint.Publishing.RestOnly.BaseCustomProperty
# The class is typically used as a base class or retrieved from SharePoint
# rather than instantiated directly
Best Practices
- This class is typically used as a base class for more specific custom property types rather than instantiated directly
- Ensure proper SharePoint authentication context is established before working with entity instances
- The entity_type_name property is used internally by the office365 library for REST API operations and should not be modified
- Inherit from this class when creating custom property types that need to interact with SharePoint Publishing REST API
- The parent Entity class handles most of the lifecycle management including loading, updating, and deleting operations
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class BigIntCustomProperty 71.6% similar
-
class Entity 70.8% similar
-
class SiteProperties 64.1% similar
-
class Search 63.8% similar
-
class PersonMagazine 62.4% similar