From 22c9fc486db21209c09ee4c691dbc268ef5e8c97 Mon Sep 17 00:00:00 2001 From: meelahme Date: Fri, 18 Apr 2025 14:18:13 -0700 Subject: [PATCH] Adding a create plugin example --- content/shared/influxdb3-cli/create/plugin.md | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/content/shared/influxdb3-cli/create/plugin.md b/content/shared/influxdb3-cli/create/plugin.md index 07271a8da..ad95c47b7 100644 --- a/content/shared/influxdb3-cli/create/plugin.md +++ b/content/shared/influxdb3-cli/create/plugin.md @@ -39,4 +39,27 @@ You can use the following environment variables to set command options: | `INFLUXDB3_DATABASE_NAME` | `--database` | | `INFLUXDB3_AUTH_TOKEN` | `--token` | - +## Examples + +### Create a plugin + +{{% code-placeholders "(DATABASE|PLUGIN)_NAME (FILENAME|FUNCTION_NAME)" %}} + + + +```bash +influxdb3 create plugin \ + --database DATABASE_NAME \ + --filename FILENAME.py \ + --entry-point FUNCTION_NAME \ + PLUGIN_NAME +``` + +{{% /code-placeholders %}} + +In the example above, replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: Database name +- {{% code-placeholder-key %}}`FILENAME.py`{{% /code-placeholder-key %}}: Name of the plugin Python file (must be in the plugin directory) +- {{% code-placeholder-key %}}`FUNCTION_NAME`{{% /code-placeholder-key %}}: Name of the function in the Python file to use as the entry point +- {{% code-placeholder-key %}}`PLUGIN_NAME`{{% /code-placeholder-key %}}: Name for the new plugin \ No newline at end of file