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.
- Trigger entry points
- Log messages
- Query data
- Write data
- Cache data
- Plugin cancellation
- LineBuilder
- TableBatch
- Exceptions
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 type | Trigger specification | Entry point function |
|---|---|---|
| Data write (WAL) | table:TABLE_NAME or all_tables | process_writes() |
| Scheduled | every:DURATION or cron:EXPRESSION | process_scheduled_call() |
| HTTP request | request:REQUEST_PATH | process_request() |
process_writes()
def process_writes(
influxdb3_local,
table_batches: Sequence[TableBatch],
args: Mapping[str, str] |