Python Pillow or Opencv : Rotation of a rectangle around circle center endpoint

Job ID: 32747733

Budget: €8 – €30 EUR

Given a circle and a rectangle image.
I need a simple python script using Pillow or Opencv to rotate a rectangle around the circle center.
The script needs to replicate the copy and rotate tool Adobe Illustrator.
Related categories: Python Image Processing OpenCV