title: @setter: Pass and set all class properties in one method
body: <p>I have a need for a Singleton class instance that is accessible from anywhere has certain session variables that can change.</p>
  <pre><code>class MySingletonClass(Singleton):
  
      @property
      def session(self):
          return self
  
      @session.setter
      def session(self, d):
          self.name = d['name']
          self.id = d['id']
          self.mode = d['mode']
  
  experiment = MySingletonClass()
  </code></pre>
  <p>This can then be imported and variables set as such</p>
  <pre><code>from core import experiment
  experiment.session={'name':'my_exp_name', 'mode':'my_mode', 'id':&quot;1234&quot;}
  </code></pre>
  <p>I want to pass them all in one but instead of a dictionary as I have currently, as a function argument. So something like the following:</p>
  <pre><code>experiment.set_session('my_exp_name', 'my_mode','1234')
  </code></pre>
  <p>My current property approach prevents that from doing. I do want to maintain each session variable as a property in and of itself but I also want to set them all together since there are plenty of session variables. Just dont like the passing it as a dictionary.</p>
  <p>I would appreciate if someone can help with the design and/or make it better. I need an instance of a class that has a bunch of variables that can be accessed from anywhere. The variables inside the class can change but not the class instance itself. And I need a better was to set all the variables in one go (preferably a method instead of setting the dictionary)</p>