libdmon.py: proposed API