title: How do you find python package metadata information given a module
body: <p>I'm trying to retrieve metadata information for a python package given the name of the module.</p>
  
  <p>I can use importlib-metadata to retrieve the information, but in some cases the top-level module name is not the same as the package name.</p>
  
  <p>example: </p>
  
  <pre><code>&gt;&gt;&gt; importlib_metadata.metadata('zmq')['License']
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "c:\Users\xxxxx\AppData\Local\Programs\Python\Python37\Lib\site-packages\importlib_metadata\__init__.py", line 499, in metadata
      return Distribution.from_name(distribution_name).metadata
    File "c:\Users\xxxxx\AppData\Local\Programs\Python\Python37\Lib\site-packages\importlib_metadata\__init__.py", line 187, in from_name
      raise PackageNotFoundError(name)
  importlib_metadata.PackageNotFoundError: zmq
  
  
  &gt;&gt;&gt; importlib_metadata.metadata('pyzmq')['License']
  'LGPL+BSD'
  </code></pre>