class UploadStrategy(Enum)Upload strategy for context synchronization
UPLOAD_BEFORE_RESOURCE_RELEASE = "UploadBeforeResourceRelease"class DownloadStrategy(Enum)Download strategy for context synchronization
DOWNLOAD_ASYNC = "DownloadAsync"class UploadMode(Enum)Upload mode for context synchronization
FILE = "File"ARCHIVE = "Archive"class Lifecycle(Enum)Lifecycle options for recycle policy
LIFECYCLE_1DAY = "Lifecycle_1Day"LIFECYCLE_3DAYS = "Lifecycle_3Days"LIFECYCLE_5DAYS = "Lifecycle_5Days"LIFECYCLE_10DAYS = "Lifecycle_10Days"LIFECYCLE_15DAYS = "Lifecycle_15Days"LIFECYCLE_30DAYS = "Lifecycle_30Days"LIFECYCLE_90DAYS = "Lifecycle_90Days"LIFECYCLE_180DAYS = "Lifecycle_180Days"LIFECYCLE_360DAYS = "Lifecycle_360Days"LIFECYCLE_FOREVER = "Lifecycle_Forever"@dataclass
class UploadPolicy()Defines the upload policy for context synchronization
Attributes:
auto_upload: Enables automatic upload
upload_strategy: Defines the upload strategy
upload_mode: Defines the upload mode (UploadMode.FILE or UploadMode.ARCHIVE)
auto_upload = Trueupload_strategy = UploadStrategy.UPLOAD_BEFORE_RESOURCE_RELEASEupload_mode = UploadMode.FILE@classmethod
def default(cls)Creates a new upload policy with default values
@dataclass
class DownloadPolicy()Defines the download policy for context synchronization
Attributes:
auto_download: Enables automatic download
download_strategy: Defines the download strategy
auto_download = Truedownload_strategy = DownloadStrategy.DOWNLOAD_ASYNC@classmethod
def default(cls)Creates a new download policy with default values
@dataclass
class DeletePolicy()Defines the delete policy for context synchronization
Attributes:
sync_local_file: Enables synchronization of local file deletions
sync_local_file = True@classmethod
def default(cls)Creates a new delete policy with default values
@dataclass
class ExtractPolicy()Defines the extract policy for context synchronization
Attributes:
extract: Enables file extraction
delete_src_file: Enables deletion of source file after extraction
extract_current_folder: Enables extraction to the current folder
extract = Truedelete_src_file = Trueextract_current_folder = False@classmethod
def default(cls)Creates a new extract policy with default values
@dataclass
class RecyclePolicy()Defines the recycle policy for context synchronization
Attributes:
lifecycle: Defines how long the context data should be retained
Available options:
- LIFECYCLE_1DAY: Keep data for 1 day
- LIFECYCLE_3DAYS: Keep data for 3 days
- LIFECYCLE_5DAYS: Keep data for 5 days
- LIFECYCLE_10DAYS: Keep data for 10 days
- LIFECYCLE_15DAYS: Keep data for 15 days
- LIFECYCLE_30DAYS: Keep data for 30 days
- LIFECYCLE_90DAYS: Keep data for 90 days
- LIFECYCLE_180DAYS: Keep data for 180 days
- LIFECYCLE_360DAYS: Keep data for 360 days
- LIFECYCLE_FOREVER: Keep data permanently (default) paths: Specifies which directories or files should be subject to the recycle policy Rules:
- Must use exact directory/file paths
- Wildcard patterns (* ? [ ]) are NOT supported
- Empty string "" means apply to all paths in the context
- Multiple paths can be specified as a list Default: [""] (applies to all paths)
lifecycle = Lifecycle.LIFECYCLE_FOREVERpaths = field(default_factory=lambda: [""])@classmethod
def default(cls)Creates a new recycle policy with default values
@dataclass
class WhiteList()Defines the white list configuration
Attributes:
path: Path to include in the white list
exclude_paths: Paths to exclude from the white list
path = ""exclude_paths = field(default_factory=list)@dataclass
class BWList()Defines the black and white list configuration
Attributes:
white_lists: Defines the white lists
white_lists = field(default_factory=list)@dataclass
class MappingPolicy()Defines the mapping policy for cross-platform context synchronization
Attributes:
path: The original path from a different OS that should be mapped to the current context path
path = ""@classmethod
def default(cls)Creates a new mapping policy with default values
@dataclass
class SyncPolicy()Defines the synchronization policy
Attributes:
upload_policy: Defines the upload policy
download_policy: Defines the download policy
delete_policy: Defines the delete policy
extract_policy: Defines the extract policy
recycle_policy: Defines the recycle policy
bw_list: Defines the black and white list
mapping_policy: Defines the mapping policy for cross-platform context synchronization
upload_policy = Nonedownload_policy = Nonedelete_policy = Noneextract_policy = Nonerecycle_policy = Nonebw_list = Nonemapping_policy = None@classmethod
def default(cls)Creates a new sync policy with default values
@dataclass
class ContextSync()Defines the context synchronization configuration
Attributes:
context_id: ID of the context to synchronize
path: Path where the context should be mounted
policy: Defines the synchronization policy
beta_wait_for_completion: Beta feature flag to control whether session creation
should wait for this context's initial download to finish. If set to False, the SDK will not block create_session on this context. Defaults to None (treated as True for backward compatibility).
context_id = Nonepath = Nonepolicy = Nonebeta_wait_for_completion = None@classmethod
def new(cls,
context_id: str,
path: str,
policy: Optional[SyncPolicy] = None,
beta_wait_for_completion: Optional[bool] = None)Creates a new context sync configuration
def with_policy(policy: SyncPolicy)Sets the policy
Documentation generated automatically from source code using pydoc-markdown.