influxdb3-plugin-sdk
Author-side packaging library for InfluxDB 3 plugins.
Provides the library functions that influxdb3-plugin-cli
wraps in user-facing subcommands.
Public modules
scaffold— generate a single-file plugin directory or index directory from a built-in template (process_writes,process_scheduled_call,process_request,index). Plugin templates write<name>.pyas their entry point.validate— the filesystem + Python-parser mechanism for validating a plugin directory.plugin_dirwalks the directory, reads the entry point, and feeds the results into the pure contract ininfluxdb3_plugin_schemas::plugin_format, returning aValidatedPluginDefinition(parsed manifest + classifiedEntryPoint) on success or aValidationFailureon error. Supports multi-file plugins (with__init__.py) and single-file plugins (a sole.pyfile at the top level). The referencetree-sitter-pythonextractorextract_top_level_defsis exposed publicly so other consumers (e.g. the runtime) can reuse it; it is drift-checked againstschemas::plugin_format::TOP_LEVEL_DEF_CONFORMANCE_CASES.archive— canonical tar.gz construction per Spec 2 Reproducibility. Byte-deterministic across machines given identical inputs.hash— SHA-256 of archive bytes in the canonicalsha256:<64 lowercase hex chars>form.mutate_index— add, yank, and unyank entries in an existing index. Enforces Spec 1 S1-4 / Spec 2 S2-2 immutability on add and preserves original publication timestamps when yanking or unyanking.package— composes validate → archive → hash → mutate_index into a single pipeline, assigning current UTCpublished_atto newly packaged plugin versions.
Stability
Internal crate. Per the plugin SDK's Spec 2 Stability policy, this
crate has no semver commitment — consumers go through
influxdb3-plugin-cli's public API. Refactoring freedom in the sdk
crate is the goal; the stable boundary is cli.
Dependencies
influxdb3-plugin-schemas— canonical schema types (re-exported via function signatures).tree-sitter+tree-sitter-python— static Python analysis at author time. Linked as C code inside the binary; no runtimepython3dependency.tar+flate2(withrust_backend/miniz_oxidefor deterministic gzip bytes) — archive construction.sha2— artifact hashing.walkdir— plugin directory traversal.