Types of plug-ins#

Tattler plug-ins can be either:

Addressbook plug-ins

Allow you to give tattler information about a user (notification recipient).

Context plug-ins

Allow you to give tattler data to fill out template variables.

Tattler can operate both without and with plug-ins. You can also provide multiple plug-ins of each type.

Each type of plug-in is coded in python, by extending a class.

Plug-in interface#

Regardless of the type, you provide any plug-in by placing a python script into a special folder.

This file must fulfill these requirements:

So if you configure TATTLER_PLUGIN_PATH=foo/my_plugin_path, this directory may look like this:

foo/my_plugin_path/
├─ foo.py                       # <- will be ignored: wrong suffix
├─ users_tattler_plugin.py
└─ billing_tattler_plugin.py

Plug-in chains#

For each plug-in type you may provide zero, one or multiple plug-ins.

If you provide multiple plug-ins, they are processed in sequence, in the alphanumeric order of their class names.

Addressbook plug-ins are run in sequence until one provides any data.

Context plug-ins are run in sequence, and:

  • The first plug-in receives the native context generated by Tattler.

  • Each subsequent plug-in receives the context returned by its preceding plug-in.

flowchart LR TattlerServer --> |native context| Plugin1 Plugin1 --> |context1| Plugin2 Plugin2 --> |context2| Templates