python-utmp provides modules to access utmp and wtmp records read/write from
python (both 2 and 3).
To learn more,
read the README file coming with it.
The official repository is on github.
You can download the tarball and Debian package from here.
The software is licensed under a variation of Just van Rossum's Python-Powered LOGO license.