The open-source monitoring tool Glances can be used as a Python library in version 4.4.0. It also includes a snapshot mode and many bug fixes.
Both Windows 10 and Windows 11 have a bug that causes your PC to restart when you choose the Update and shut down option.