class DeltaPath
DeltaPath is a specialized path class that represents a 'delta' entity path in the Office365 SDK, inheriting from EntityPath.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/delta_path.py
4 - 8
simple
Purpose
This class provides a specific implementation of EntityPath for handling delta query paths in Microsoft Graph API or Office365 services. Delta queries are used to track changes in resources over time. The class encapsulates the path construction logic for delta endpoints, automatically setting the path segment to 'delta' and managing parent relationships.
Source Code
class DeltaPath(EntityPath):
"""Delta path"""
def __init__(self, parent=None):
super(DeltaPath, self).__init__("delta", parent, parent)
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
EntityPath | - |
Parameter Details
parent: Optional parent path object that this DeltaPath is nested under. Used to build hierarchical path structures in the Office365 API. Defaults to None if this is a root-level delta path. The parent is passed to both the EntityPath constructor's parent and delimiter parameters.
Return Value
Instantiation returns a DeltaPath object configured with the 'delta' segment name and the specified parent relationship. The object inherits all methods and properties from EntityPath for path manipulation and traversal.
Class Interface
Methods
__init__(self, parent=None) -> None
Purpose: Initializes a DeltaPath instance with the 'delta' segment and optional parent path
Parameters:
parent: Optional parent EntityPath object for building hierarchical paths. Defaults to None.
Returns: None - constructor initializes the instance
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
_name |
str | Inherited from EntityPath, stores the segment name 'delta' | instance |
_parent |
EntityPath or None | Inherited from EntityPath, stores the parent path object if provided | instance |
Dependencies
office365
Required Imports
from office365.runtime.paths.v4.entity import EntityPath
from office365.runtime.paths.v4.delta import DeltaPath
Usage Example
from office365.runtime.paths.v4.delta import DeltaPath
from office365.runtime.paths.v4.entity import EntityPath
# Create a standalone delta path
delta_path = DeltaPath()
# Create a delta path with a parent entity
parent_entity = EntityPath('users')
delta_path_with_parent = DeltaPath(parent=parent_entity)
# The delta path can be used to construct API endpoints for delta queries
# Example: /users/delta for tracking changes in users collection
Best Practices
- Use DeltaPath when constructing endpoints for delta queries in Office365/Microsoft Graph API to track changes over time
- Always ensure the parent parameter is an appropriate EntityPath object if building nested path structures
- DeltaPath is immutable after construction - create new instances for different paths rather than modifying existing ones
- The class automatically handles the 'delta' segment naming, so you don't need to specify it manually
- Understand that this is part of a larger path hierarchy system in the Office365 SDK and should be used within that context
- Delta queries typically require proper token management for pagination and change tracking - ensure your authentication context supports this
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class EntityPath_v1 68.8% similar
-
class EntityPath 65.9% similar
-
class DeltaCollection 65.4% similar
-
class ItemPath 64.0% similar
-
class StaticOperationPath 58.4% similar