Spaces:
Runtime error
Runtime error
Download Pinpoint/ConfigManager.py from User1342/WatchTower: direct link, hf CLI and curl.
- Browser
- Download file 569 Bytes
-
https://huggingface.co/spaces/User1342/WatchTower/resolve/main/Pinpoint/ConfigManager.py
- Command line
-
hf download hf://spaces/User1342/WatchTower/Pinpoint/ConfigManager.py
-
curl -L -o ConfigManager.py https://huggingface.co/spaces/User1342/WatchTower/resolve/main/Pinpoint/ConfigManager.py
569 Bytes
| import json | |
| from pathlib import Path | |
| class ConfigManager: | |
| """ | |
| A wrapper file used to abstract Twitter config options. """ | |
| def _get_config(config_path): | |
| if Path(config_path).is_file() == False: | |
| raise Exception("The {} config file was not found.".format(config_path)) | |
| with open(config_path) as json_file: | |
| twitter_config_dict = json.load(json_file) | |
| return twitter_config_dict | |
| def getTwitterConfig(): | |
| return ConfigManager._get_config("twitterConfig.json") | |