plone.api.addon#

API to handle add-on management.

class plone.api.addon.AddonInformation[source]#

Add-on information.

__init__(id: str, version: str, title: str, description: str, upgrade_profiles: Dict, other_profiles: List[List], install_profile: Dict, uninstall_profile: Dict, profile_type: str, upgrade_info: Dict, valid: bool, flags: List[str]) None#
class plone.api.addon.NonInstallableAddons[source]#

Set of add-ons not available for installation.

__init__(profiles: List[str], products: List[str]) None#
plone.api.addon.get(addon: str) AddonInformation[source]#

Information about an Add-on.

Parameters:

addon -- ID of the add-on to be retrieved.

Returns:

Add-on information.

Return type:

string

plone.api.addon.get_addon_ids(limit: str = '') List[str][source]#

List add-ons ids in this Plone site.

Parameters:

limit (string) -- Limit list of add-ons. 'installed': only products that are installed and not hidden 'upgradable': only products with upgrades 'available': products that are not installed but could be 'non_installable': Non installable products 'broken': uninstallable products with broken dependencies

Returns:

List of add-on ids.

plone.api.addon.get_addons(limit: str = '') List[AddonInformation][source]#

List add-ons in this Plone site.

Parameters:

limit (string) -- Limit list of add-ons. 'installed': only products that are installed and not hidden 'upgradable': only products with upgrades 'available': products that are not installed but could be 'non_installable': Non installable products 'broken': uninstallable products with broken dependencies

Returns:

List of AddonInformation.

Raises:

InvalidParameterError

Example:

Get add-ons

plone.api.addon.get_version(addon: str) str[source]#

Return the version of the product (package).

plone.api.addon.install(addon: str) bool[source]#

Install an add-on.

Parameters:

addon -- ID of the add-on to be installed.

Returns:

Status of the installation.

plone.api.addon.uninstall(addon: str) bool[source]#

Uninstall an add-on.

Parameters:

addon -- ID of the add-on to be uninstalled.

Returns:

Status of the uninstallation.

Return type:

Boolean value representing the status of the uninstallation.