parsedmarc/kafkaclient.py
def strip_metadata(report):
        """
          Duplicates org_name, org_email and report_id into JSON root
          and removes report_metadata key to bring it more inline
          with Elastic output.
        """
        report['org_name'] = report['report_metadata']['org_name']
        report['org_email'] = report['report_metadata']['org_email']
        report['report_id'] = report['report_metadata']['report_id']
        report.pop('report_metadata')

        return report
def strip_metadata(report):
        report['org_name'] = report['report_metadata']['org_name']
        report['org_email'] = report['report_metadata']['org_email']
        report['report_id'] = report['report_metadata']['report_id']
        report.pop('report_metadata')

        return report
def strip_metadata ( report ) : report [ 'org_name' ] = report [ 'report_metadata' ] [ 'org_name' ] report [ 'org_email' ] = report [ 'report_metadata' ] [ 'org_email' ] report [ 'report_id' ] = report [ 'report_metadata' ] [ 'report_id' ] report . pop ( 'report_metadata' ) return report
Duplicates org_name, org_email and report_id into JSON root
          and removes report_metadata key to bring it more inline
          with Elastic output.
Duplicates org_name org_email and report_id into JSON root and removes report_metadata key to bring it more inline with Elastic output .