core.links

This module allows runtime creation and removal of links.

This function adds a Link to an Item using a ManagedItemChannelLinkProvider.

Parameters
  • item_or_item_name (Item or str) – the Item object or name to create the Link for

  • channel_uid_or_string (ChannelUID or str) – the ChannelUID or string representation of a ChannelUID to link the Item to

Returns

the Item that the Link was added to or None

Return type

Item or None

This function removes a Link from an Item using a ManagedItemChannelLinkProvider.

Parameters
  • item_or_item_name (Item or str) – the Item object or name to create the Link for

  • channel_uid_or_string (ChannelUID or str) – the ChannelUID or string representation of a ChannelUID to link the Item to

Returns

the Item that the Link was removed from or None

Return type

Item or None