title: How to dynamically load a Python class
body: <p>Given a string of a Python class, e.g. <code>my_package.my_module.MyClass</code>, what is the best possible way to load it?</p>
  
  <p>In other words I am looking for a equivalent <code>Class.forName()</code> in Java, function in Python. It needs to work on Google App Engine.</p>
  
  <p>Preferably this would be a function that accepts the FQN of the class as a string, and returns a reference to the class:</p>
  
  <pre><code>my_class = load_class('my_package.my_module.MyClass')
  my_instance = my_class()
  </code></pre>