title: How to create JWK from RSA Key pair?
body: <p>Suppose I have a python structure representing an RSA key pair as follows:</p>
  
  <pre><code>rsa_key_pair = {
      'private_key': '-----BEGIN PRIVATE KEY-----\nMIIEvAIBADAN__OBSCURED__qxu3sWAlY/bstTB5WfX8PA==\n-----END PRIVATE KEY-----\n',
      'public_key': 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCDDqGTiBYyoB9T5Haow5gcPBIIiltLVyM4vo8Txia1czgrk2XGH5t4dsWrcXIXjQafNb7PKelXZdRU36vIIAaZCZ0As5LtkC5D93+KO9PFLGkHxWi2G43naR9hOnrKliMjOd+JRUdApdY8c/wYJbDxGGuw7W9e3MsLABFEK+TnPTVJtO8Ix78FiuHRooWfU5ph7clfTeyundN2BNv8mO6ZSBiBAk6tN8Fwpljs96Z/3HnMQutX1/AFkMn5h+E0EV4CgLPvtRazfzoWNlIiXGmiVUVHrM1wna9jT/jyb7aoxkthkAXb6NNyCW/Znxq45Ozy27kZcw/X4WQ0QMmpgfX'
  }
  </code></pre>
  
  <p>How can I write python code that will produce the JWK that can be used to verify JWT signed with this RSA private key? The Algorithm used is RSA256.</p>
  
  <p>This website <a href="https://mkjwk.org/" rel="noreferrer">mkjwk</a> accomplishes what I'm trying to do. But I'm trying to do it in python code.</p>