lgtm.com warns about this.
These examples show how to call libnm from Python using GObject introspection.