title: Get package name of caller script from imported python file
body: <p>I have a project that will be <strong>zipped</strong> and run from Spark, let's call it &quot;client&quot; project.</p>
  <p>I would like, on a library imported by a script within this client project, to read some static config file the &quot;client&quot; program will provide following a certain structure.</p>
  <p>However, I can't seem to find a way to get the package name of the script importing the library's file, in order to read the configuration file.</p>
  <p>Note: I use <code>pkg_resources</code> as the project will be packaged as a Zip file and will therefore lack the access to the file structure of the project.</p>
  <hr />
  <p>So, for a client project with the current structure:</p>
  <pre><code>project/
  ├── package1/
  │   ├── __init__.py
  │   ├── main.py
  │   └── conf/
  │       └── conf.txt
  </code></pre>
  <p><code>main.py</code>:</p>
  <pre><code>from library import SuperClass
  
  class Main(SuperClass):
      
      def __init__(self):
          super().__init__()
          print(self.conf) # conf.txt file read from SuperClass 
  </code></pre>
  <hr />
  <p>And on the library's side:
  <code>library.py</code></p>
  <pre><code>import importlib.resources as pkg_resources
  
  class SuperClass:
      
      def __init__(self):
          self.conf = self.__read_conf()
  
      def __read_conf(self):
          return pkg_resources.read_text('????conf', 'conf.txt') # issue here
  </code></pre>
  <p>So my question is: what would be the value of the first argument of <code>pkg_resources.read_text</code>?</p>