active_layer = Gimp.Image.get_selected_layers(image)[0]
new_layer = Gimp.Layer.copy(drawable)
Gimp.Image.insert_layer(image, new_layer, None, 0)
f = Gimp.DrawableFilter.new(layer, "gegl:unsharp-mask", "")
filter_config = f.get_config()
filter_config.set_property('std-dev', 3.0) # radius
filter_config.set_property('scale', 0.25) # amount
filter_config.set_property('threshold', 0.0)
# layer.append_filter(f)
layer.merge_filter(f)
Haven't found anything for despecle :-(
The GIMP 3 API is here:
https://developer.gimp.org/api/3.0/libgimp/index.htmlJust enter what you are looking for in the search box
GEGL operations ( like unsharp mask) are here
https://gegl.org/operations/index.htmlAs an example ... find foggify.py in your installation. That shows you some very basic plug-in stuff.