content/shared/influxdb3-plugins/plugins-library/_index.md
Browse plugins for {{% product-name %}}. Use these plugins to extend your database functionality with custom Python code that runs on write events, schedules, or HTTP requests.
{{< children show="sections" >}}
All plugins require:
Plugins in this library include a JSON metadata schema in a docstring header that defines supported trigger types and configuration parameters. This metadata enables:
Many plugins in this library support using TOML configuration files to specify all plugin arguments. This is useful for complex configurations or when you want to version control your plugin settings.
To use TOML configuration files, you must set the PLUGIN_DIR environment variable in the {{% product-name %}} host environment. This is required in addition to the --plugin-dir flag when starting {{% product-name %}}:
--plugin-dir tells {{% product-name %}} where to find plugin Python filesPLUGIN_DIR environment variable tells the plugins where to find TOML configuration filesStart {{% product-name %}} with the PLUGIN_DIR environment variable set:
PLUGIN_DIR=~/.plugins influxdb3 serve --node-id node0 --object-store file --data-dir ~/.influxdb3 --plugin-dir ~/.plugins
Copy or create a TOML configuration file in your plugin directory:
# Example: copy a plugin's configuration template
cp plugin_config_example.toml ~/.plugins/my_config.toml
Edit the TOML file to match your requirements. The TOML file should contain all the arguments defined in the plugin's argument schema.
Create a trigger with the config_file_path argument:
When creating a trigger, specify the config_file_path argument to point to your TOML configuration file.
PLUGIN_DIRinfluxdb3 create trigger \
--database mydb \
--plugin-filename plugin_name.py \
--trigger-spec "every:1d" \
--trigger-arguments config_file_path=my_config.toml \
my_trigger_name
For more information on using TOML configuration files, see the project README.