Fill the closed curve with fixed shapes

i want to create a python script or locust file to automatically stuff the least rectangle inside cuver close like an image. Hope everybody help please. because the amount I need to do is quite large

most of the time it is better to bring some work.

Because you wrote

but it seems you want somebody else to write what you want and with quite no specifications.

Some hints :
Cut the shape every steps (or more) with infinite lines
Find the maximum interval (in X if you choose to work on XY plane) that contains 2 (or more) consecutive intersections,
Count how many intersections are in this interval (use Math.Ceiling)
Then draw the rectangles

That’s all.

I have done a tool not so different, I think I will add it to my Nautilus plugin and add a constrain in lenght.