This is a memo on how to achieve double-sided ruby (furigana) in Word using python-docx.
You can try it from the following notebook.
https://colab.research.google.com/github/nakamura196/ndl_ocr/blob/main/python_docxを用いた両側ルビ.ipynb
An output example is shown below.

An input example is shown below.
The program is still incomplete, but I hope it serves as a helpful reference.