def yaml(self):
        return yaml.dump(self.serialized, default_flow_style=False,
                         encoding=None)
def allowed_file(filename):
    return '.' in filename and \
           filename.rsplit('.', 1)[1] in app.config.get('ALLOWED_EXTENSIONS')