Assuming you have already imported the relevant classes using something like
from [app].models import *
all you will need to do is
klass = globals()["class_name"]
instance = klass()
More Related Contents:
- Transpose/Unzip Function (inverse of zip)?
- Should import statements always be at the top of a module?
- generating variable names on fly in python [duplicate]
- How to solve “error: Microsoft Visual C++ 14.0 or greater is required” when installing Python packages?
- Proxy with urllib2
- How does numpy.newaxis work and when to use it?
- Why do we use __init__ in Python classes?
- Relative imports in Python 3
- Windows cmd encoding change causes Python crash
- Pairs from single list
- Using an HTTP PROXY – Python [duplicate]
- Django upgrading to 1.9 error “AppRegistryNotReady: Apps aren’t loaded yet.”
- Python 3: EOF when reading a line (Sublime Text 2 is angry)
- Count consecutive occurences of values varying in length in a numpy array
- How to ssh connect through Python Paramiko with ppk public key
- PyEval_InitThreads in Python 3: How/when to call it? (the saga continues ad nauseam)
- Program freezing during the execution of a function in Tkinter
- Password Protecting Excel file using Python
- Get data from pandas into a SQL server with PYODBC
- Kill a running subprocess call
- Python 3 dictionary with known keys typing
- How to symlink python in Homebrew?
- What is the pythonic way to count the leading spaces in a string?
- What refactoring tools do you use for Python? [closed]
- What is the best way for checking if the user of a script has root-like privileges?
- Python: False vs 0
- Selecting pandas column by location
- Type hints with user defined classes
- Unable to get a window, abort
- Replace QWidget objects at runtime