Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /limber-project_limberframework /limberframework /config /config.py
| """Classes for accessing config settings.""" | |
| from ast import literal_eval | |
| from configparser import ConfigParser | |
| from typing import Dict | |
| class Config(ConfigParser): | |
| """Wrapper class for ConfigParser. | |
| Provides helper functions for accessing options in | |
| the configuration files. | |
| """ | |
| def get_section(self, section: str) -> Dict: | |
| """Retrieve a section from ConfigParser and casts the options. | |
| Args: | |
| section: Section to retrieve. | |
| Returns: | |
| dict: Cast options for the section. | |
| """ | |
| section = self.__getitem__(section) | |
| options = {} | |
| for option, value in section.items(): | |
| try: | |
| value = literal_eval(value) | |
| except (ValueError, SyntaxError): | |
| pass | |
| options[option] = value | |
| return options | |
Xet Storage Details
- Size:
- 854 Bytes
- Xet hash:
- 018842d4d2f0f0faddb90faf777611c83d91dd1e65e85ff25fecfcbb0e330f91
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.