Measuring power from PYNQ depends on if the board you are using has onboard power measurement capability.
PMBus is a chip that is often included on development boards to measure power.
There is a PYNQ class to control the PMBus.
https://github.com/Xilinx/PYNQ/blob/image_v2.4/pynq/pmbus.py
For the PYNQ supported boards, PYNQ-Z1, PYNQ-Z2, and ZCU104, only the ZCU104 has the PMBus.
You can see any example notebook here:
https://github.com/Xilinx/PYNQ/blob/image_v2.4/boards/ZCU104/notebooks/common/zcu104_pmbus.ipynb
If you are using the ZC706, the first point is that it is not an officially supported board, so you woudl need to build your own image. However, it has a PMBus chip, so you may be able to use it with the PYNQ pmbus class. You would need to check it is actually accessible to the PS. Sometimes these chips are only intended to be used with an external adapter, and don’t have data connections to the ZYnq chip.You would then need to get this working with your PYNQ image. We can try help - you can post questions here.
For PYNQ-Z1, and PYNQ-Z2, there is no on-chip measurement, but you can use external power measurement devices.
You can buy reasonably inexpensive USB power meters, or socket meters.
I’ve used a similar one to this*:
*other providers are available
Cathal