GIMP 2.99/ Python3 How to duplicate a stock brush?

How does duplicating a brush work in GIMP 2.99 scripts?
copy_name = Gimp.brush_duplicate("2. Hardness 100")
does not work. What’s the correct way?

  1. To get a named brush use: mybrush = Gimp.Brush.get_by_name("2. Hardness 100")
  2. To duplicate the brush: brush_copy = mybrush.duplicate()

Above is untested, but these are the functions in the docs. Note that you can download the latest docs e.g. here but be warned this expires fast, probably in a day, in that case you will have to find a newer “job” with dev-docs.

Yes, that works.
Thanks a lot.

Just a short hint:
Brushes seem to have dynamics “on” by default. (Different behaviour than GIMP 2.10?)
So to avoid fading it has to be switched off like so: