title: How to create a new unknown or dynamic/expando object in Python
body: <p>In python how can we create a new object without having a predefined Class and later dynamically add properties to it ?</p>
  
  <p>example: </p>
  
  <pre><code>dynamic_object = Dynamic()
  dynamic_object.dynamic_property_a = "abc"
  dynamic_object.dynamic_property_b = "abcdefg"
  </code></pre>
  
  <p>What is the best way to do it?</p>
  
  <p><strong>EDIT</strong> Because many people advised in comments that I might not need this. </p>
  
  <p>The thing is that I have a function that serializes an object's properties. For that reason, I don't want to create an object of the expected class due to some constructor restrictions, but instead create a similar one, let's say like a <strong>mock</strong>, add any "custom" properties I need, then feed it back to the function.</p>