INNER CODE UNIT · Python
load_from_config
miztiik/AWS-Demos · how-to-examples/iam-s3-sqs-sns-video-transcoder.py:163
def load_from_config(cls, config_filepath):
"""
Load a new transcoder from a JSON config file.
"""
with open(config_filepath, 'r') as config:
config_data = json.load(config)
return AutoTranscode(**config_data)
@classmethod
def create_empty_config(cls, config_filepath):
"""
Create a default JSON config file. After this method is run,
you must edit the file before this application can work.
"""
with open(config_filepath, 'w') as config:
json.dump(cls.empty_config_data, config, indent=4)
def ensure_local_setup(self):