Here is a start of high level safe API. My plan is to re-implement tools/pw-mon so I started binding the API it requires.
tools/pw-mon
@wtaymans @gkiagia @arun : any comment on the general shape of the API, or its implementation, is welcome.