platypush.backend.trello

class platypush.backend.trello.TrelloBackend(boards: List[str], token: str, **kwargs)[source]

This backend listens for events on a remote Trello account through websocket interface.. Note that the Trello websocket interface is not officially supported and it requires a different token from the one you use for the Trello API (and for the Trello plugin). To get the websocket token:

  1. Open https://trello.com in your browser.
  2. Open the developer tools (F12), go to the Network tab, select ‘Websocket’ or ‘WS’ in the filter bar and refresh the page.
  3. You should see an entry in the format wss://trello.com/1/Session/socket?token=<token>.
  4. Copy the <token> in the configuration of this backend.

Requires:

Triggers:

  • platypush.message.event.trello.NewCardEvent when a card is created.
  • platypush.message.event.MoveCardEvent when a card is moved.
  • platypush.message.event.ArchivedCardEvent when a card is archived/closed.
  • platypush.message.event.UnarchivedCardEvent when a card is un-archived/opened.
__init__(boards: List[str], token: str, **kwargs)[source]
Parameters:
  • boards – List of boards to subscribe, by ID or name.
  • token – Trello web client API token.
run()[source]

Starts the backend thread. To be implemented in the derived classes if the loop method isn’t defined.