Sounds like a job for the inspect module. I don't have a great deal of 
familiarity here so others may have better suggestions but given a toy 
class:<br><br>class foo(object):<br>    @property<br>    def x(self):<br>        return 1<br>
<br>I can use inspect to get all the attributes and values of objects of class with<br><br>&gt;&gt;&gt; import inspect<br>&gt;&gt;&gt; f = foo()<br>&gt;&gt;&gt;dict(inspect.getmembers(f)) # returns a list of two tuples that I pass to dict<br>
{&#39;__class__&#39;: &lt;class &#39;__main__.foo&#39;&gt;,<br> &#39;__delattr__&#39;: &lt;method-wrapper &#39;__delattr__&#39; of foo object at 0xa021f4c&gt;,<br> &#39;__dict__&#39;: {},<br>... snip ...<br> &#39;x&#39;: 1}<br>

<br>You could use this dict in your format strings if you know that all 
properties are side-effect free. Alternatively if you need a more 
sophisticated method you could copy the __dict__ of your object and then
 add to it by calling inspect.classify_class_attrs on your class (not 
the instance) and noting that properties are identified in the resulting
 list of attribute objects. You could then call each one and add its  
name and value to your copy of obj.__dict__.<br>
<br>Hmm - this still has you calling all the properties beforehand and 
seems clunky. Aha! Try adding a __getitem__ method to your class like:<br><br><br>class foo(object):<br>
    @property<br>
    def x(self):<br>
        return 1<br>
<br>    def __getitem__(self, key):<br>        return getattr(self, key)<br><br>And then your class emulates dictionary access (for item retrieval at least) so that<br><br>&gt;&gt;&gt; f = foo()<br>&gt;&gt;&gt; f[&#39;x&#39;] # dict access<br>

1<br>&gt;&gt;&gt; &quot;%(x)s&quot; % f # and  string formatting with named labels as a consequence<br>&#39;1&#39;<br><br>-regards<br><font color="#888888">Simeon Franklin<br><a href="tel:209%20846-2151" value="+12098462151" target="_blank">209 846-2151</a></font><br>