Setup#

class SetupType(*values)[source]#

Bases: Enum

class Setup(config: ConfigManager, ui_config: UIConfigManager, plist_manager: PropertyListManager)[source]#

Handles the initial setup process for the Patcher CLI tool.

This class guides users through configuring the necessary components to integrate with their Jamf environment. The setup includes creating API roles, clients, and configuring user interface settings for PDF reports.

Parameters:
property completed: bool[source]#

Indicates whether the setup process has been completed.

Returns:

True if setup has been completed, False otherwise.

Return type:

bool

async start(animator: Animation | None = None) None[source]#

Allows the user to choose between different setup methods (Standard or SSO).

An optional Animation object can be passed to update animation messages at runtime. Defaults to self.animator.

Options:

  • STANDARD prompts for basic credentials, obtains basic token, creates API integration, saves client credentials and obtains an AccessToken.

  • SSO prompts for existing API credentials, obtains AccessToken and saves credentials.

See also

For SSO users, reference our Handling SSO in Jamf Pro page for assistance creating an API integration.

Parameters:

animator (Optional [Animation]) – The animation instance to update messages. Defaults to self.animator.

Raises:

SetupError – If a token could not be fetched, credentials are missing or setup could not be marked complete.

Return type:

None

reset_setup() bool[source]#

Resets setup completion flag (), removing the setup_completed key/value from the property list.

This effectively marks Setup completion as False and will re-trigger the setup assistant.

Returns:

True if the Setup section in the property list file was removed.

Return type:

bool