Processing engine Python API reference

The InfluxDB 3 processing engine provides a Python API that plugins use at runtime. Nothing in this API is importable from a plugin—the runtime injects the objects instead. InfluxDB passes influxdb3_local (an InfluxDB3Local instance) as the first argument to every trigger entry point and installs LineBuilder into Python builtins before the plugin runs, so both single-file and multi-file plugins can use them without an import.

For usage patterns and examples, see Extend plugins.

Trigger entry points

A plugin defines one entry point that matches the trigger type it is attached to. You define the function; InfluxDB calls it when the trigger fires. Multi-file plugins must define the entry point in the plugin directory’s __init__.py.

Trigger typeTrigger specificationEntry point function
Data write (WAL)table:TABLE_NAME or all_tablesprocess_writes()
Scheduledevery:DURATION or cron:EXPRESSIONprocess_scheduled_call()
HTTP requestrequest:REQUEST_PATHprocess_request()

process_writes()

def process_writes(
    influxdb3_local,
    table_batches: Sequence[TableBatch],
    args: Mapping[str, str] |