title: How to check rpm GPG signature using Python3?
body: <p>I am working on creating a local CentOS mirror on a local Artifactory instance, and I built a Python3 script to check for differences between the remote and local repos and update the local ones accordingly.</p>
  
  <p>As a requirement, I need to add a step that checks the validity of the downloaded rpm packages before adding them to the local mirror. </p>
  
  <p>While I could do that by calling "rpm -K" (after importing the CentOS GPG keys), I was wondering if there would be a better way in which I can implement this, perhaps without relying on external packages. </p>