utmp
Pure-Python library to decode/read utmp and wtmp files. Please note that there is an alternative library which uses the underlying C API: pyutmp
This package requires Python 3.4.
What is utmp/wtmp?
utmp, wtmp, btmp and variants such as utmpx, wtmpx and btmpx are files on Unix-like systems that keep track of all logins and logouts to the system.
The utmp file keeps track of the current login state of each user. The wtmp file records all logins and logouts history. The btmp file records failed login attempts.
On Linux the wtmp and btmp files are usually located in the /var/log/ directory.
Usage
The utmp.read function decodes a binary utmp/wtmp stream and yields record objects:
with open('/var/log/wtmp', 'rb') as fd:
buf = fd.read()
for entry in utmp.read(buf):
print(entry.time, entry.type, entry)
Metadata
Release files for utmp 21.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| utmp-21.10.0.tar.gz | 8.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| utmp-21.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.9 kB
Release files / utmp-21.10.0.tar.gz
| Download URL | utmp-21.10.0.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
201a758e790b6e8ad2c212388a38f20a71d508e717b714d58f1949c8fcc4de5d
|
|
BLAKE2b-256 checksum How to use checksums |
9e7534181e310c9ffc70535f46169807d0ff4d68b0277d79e3e255cfe6555938
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Release files / utmp-21.10.0-py3-none-any.whl
| Download URL | utmp-21.10.0-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
01237cb4098f4fffdc32e99eda6c0230f021365dc8b987291cf6c0ce6dc5ae51
|
|
BLAKE2b-256 checksum How to use checksums |
ae605ef7cfd1f096e84a8a1b914aeaaf246407f9d100ae6d5eb6a8c789c365ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|