python-onvif-zeep icon indicating copy to clipboard operation
python-onvif-zeep copied to clipboard

How to convert a NetworkInterface to a dictionary?

Open Calinou opened this issue 5 years ago • 0 comments

Python version: 3.7.6 onvif-zeep version: 0.2.12 (from this repository)

I'd like to return a response of type NetworkInterface as a Python dictionary, so it can be returned as JSON by Flask. I've tried answers from this Stack Overflow thread but couldn't get any of them to work. As far as I know, some of the answers there don't apply as I can't modify the class declaration (since it's part of the library).

I could map all fields to a dictionary manually, but it's a lot of work and will probably end up missing fields that are only sometimes present.

Calinou avatar Mar 27 '20 09:03 Calinou