CheckpointHelper#

class omni.kit.widget.versioning.CheckpointHelper#

Bases: object

A helper class for checkpoint functionality.

This class provides static operations for processing server URLs and verifying whether checkpoints are enabled. It extracts standardized server information from a provided URL and determines if the checkpoint feature is active on the server.

The class supports both asynchronous operations and callback mechanisms. Use asynchronous functions when integrating within an async workflow, or provide a callback function to receive the checkpoint status once the operation completes.

Methods

extract_server_from_url(url)

Extracts the server components from the provided URL.

is_checkpoint_enabled_async(url)

Asynchronously checks if checkpoint is enabled for the provided URL.

is_checkpoint_enabled_with_callback(url, ...)

Checks if checkpoint is enabled for the given URL and uses a callback to return the result.

__init__()#
static extract_server_from_url(url: str) str#

Extracts the server components from the provided URL.

Parameters:

url (str) – The URL to extract the server components from.

Returns:

The server URL extracted from the input URL. Returns an empty string if URL is invalid.

Return type:

str

async static is_checkpoint_enabled_async(url: str) bool#

Asynchronously checks if checkpoint is enabled for the provided URL.

Parameters:

url (str) – The URL to verify for checkpoint enablement.

Returns:

True if checkpoint is enabled, otherwise False.

Return type:

bool

static is_checkpoint_enabled_with_callback(
url: str,
callback: Callable,
)#

Checks if checkpoint is enabled for the given URL and uses a callback to return the result.

Parameters:
  • url (str) – The URL to check for checkpoint enablement.

  • callback (Callable) – A function that receives the extracted server and checkpoint status.