🇺🇦 We stand with Ukraine! 🇺🇦

Question about "tags" or "trigger:printer.delete_sd_file"

Hello,
I am trying to write a plugin, my code is working but I don't understand the "tags" parameter, they are in many functions and I "use" them but I have no idea why :see_no_evil:

Here are some examples:

btw it´s my first plugin and my first python project :sweat_smile:
maybe someone can explain it to me, thanks

Tags are just a way of working out where in OctoPrint's code the gcode command has come from. They are passed along with the command so that if you want to you can do something different depending on what triggered the gcode command. I would say if you don't need them they can be ignored.

1 Like

thanks for the fast reply!