Needed help on protecting an excel workbook using python

Hi ,
I need some help on protecting excel workbook using python. I was using openpyxl library. But what I got is how to protect a sheet. But I need the whole workbook needed to be password protected.

I was using the below code for a sheet to be protected.

import openpyxl
from openpyxl import Workbook
book = Workbook()
sheet = book.active
sheet.protection.set_password(‘test’)

This code only sets password on the sheet. But I need how to protect the whole excel workbook.
Can anyone help?