AnonymousSpottedToad/securityPatternsRecovery / codebase /repos /python /pavanad_beegen /beegen /config /settings.py
| import os | |
| from configparser import ConfigParser | |
| CONFIG_FILENAME = "config.ini" | |
| CONFIG_ROOT_PATH = os.path.join(os.path.expanduser("~"), ".beegen") | |
| def config_path_exists() -> bool: | |
| return os.path.exists(CONFIG_ROOT_PATH) | |
| def config_file_exists() -> bool: | |
| filename = os.path.join(CONFIG_ROOT_PATH, CONFIG_FILENAME) | |
| return os.path.exists(filename) | |
| def get_configurations() -> ConfigParser: | |
| configuration = ConfigParser() | |
| if config_file_exists(): | |
| configuration.read(os.path.join(CONFIG_ROOT_PATH, CONFIG_FILENAME)) | |
| return configuration | |
| def set_configurations(configuration: ConfigParser): | |
| filename = os.path.join(CONFIG_ROOT_PATH, CONFIG_FILENAME) | |
| with open(filename, "w") as config_file: | |
| configuration.write(config_file) | |
Xet Storage Details
- Size:
- 776 Bytes
- Xet hash:
- ce7cf573656a8a3aa46524fe3f0a24e85ddf0329e37d8e8d99bf57e9e788ef1d
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.