Skip to content

Feature Request: Return Dictionary in Python #155

@peterdavidfagan

Description

@peterdavidfagan

Thank you for creating such a useful library.

A feature request I had was to incorporate the returning of Python dictionaries. The motivation for this is to enable iteration through parameters in Python without having to explicitly using full parameter names to access values.

I currently have a yaml file containing multiple sensor configs, rather than having to individually create a subscriber for each I want to have a generic register_sensors method that iterates through sensors and their configuration parameters in order to create subscriptions. To accomplish this I would like to have my parameters in a dictionary where nested parameter structure is respected.

self.param_listener = params.ParamListener(self)
self.param_dict = self.param_listener.get_params().to_dict()

Maybe this functionality already exists? I couldn't find it on an initial pass through the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions