Univention Bugzilla – Bug 50600
Provide dict like interface to udm_ob.props
Last modified: 2020-01-27 10:10:01 CET
I would like to have a dict-like interface for udm_obj.props. Especially if 'prop' in udm_obj.props would be an enrichment compared to hasattr.
Such an interface should then also be added to the Python UDM (non-HTTP) API.
The BaseObjectProperties class of the 'props' attribute of UdmObjects now inherits and implements the methods of both collections.abc.Mapping and collections.abc.Iterable. It this supports both iteration and item access like a dictionary, including the 'in' operator. [master 7ed67e8] add Mapping and Iterable interfaces to BaseObjectProperties All checks passed: * https://travis-ci.com/univention/python-udm-rest-api-client/builds/140324695 * https://codecov.io/gh/univention/python-udm-rest-api-client/commit/7ed67e82d43208218256cedd2b5053cddcb526af * https://readthedocs.org/projects/udm-rest-client/builds/
Changes added: OK Tests: OK Actively used: OK Thanks for implementing these interfaces. Makes using the client much more easy!