Parse a configuration dictionary, optionally fetching data from env variables. :param dict[str, any] config: the configuration :rtype: dict[str, str] :return: the parse configuration
(config)
| 742 | |
| 743 | @staticmethod |
| 744 | def _parse_config(config): |
| 745 | """ |
| 746 | Parse a configuration dictionary, optionally fetching data from env variables. |
| 747 | |
| 748 | :param dict[str, any] config: the configuration |
| 749 | :rtype: dict[str, str] |
| 750 | :return: the parse configuration |
| 751 | """ |
| 752 | cfg = {} |
| 753 | for key, value in config.items(): |
| 754 | if isinstance(value, dict): |
| 755 | if 'env' in value: |
| 756 | value = os.getenv(value['env'], value.get('default', None)) |
| 757 | cfg[key] = value |
| 758 | return cfg |
| 759 | |
| 760 | @property |
| 761 | def buffer_size(self): |