🔍 Code Extractor

class BaseCustomProperty

Maturity: 22

BaseCustomProperty is a SharePoint entity class representing a base custom property in the SharePoint Publishing REST API.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/publishing/customproperties/base.py
Lines:
4 - 7
Complexity:
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

    A specialized custom property class for representing big integer (64-bit integer) custom properties in SharePoint Publishing REST API operations.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/publishing/customproperties/bigint.py
  • class Entity 70.8% similar

    Base class for SharePoint entities that provides common operations like create, read, update, and delete (CRUD) functionality for SharePoint objects.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/entity.py
  • class SiteProperties 64.1% similar

    Represents a SharePoint site collection's properties and provides methods to query and update site-level settings such as sharing capabilities, lock state, and customization permissions.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/tenant/administration/sites/properties.py
  • class Search 63.8% similar

    A SharePoint Publishing Search entity class that represents search functionality within SharePoint's publishing infrastructure.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/publishing/search.py
  • class PersonMagazine 62.4% similar

    PersonMagazine is a SharePoint entity class representing a person magazine object in the SharePoint Publishing framework.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/publishing/personmagazine/person_magazine.py
← Back to Browse