Instantiate a model when the kind of model needed is represented as a string argument
- by indiehacker
My input data is a string representing the kind of datastore model I want to make.
In python, I am using the eval() function to instantiate the model (below code), but this seems overly complex so I was wondering if there is a simpler way people normally do this?
>>>model_kind="TextPixels"
>>>key_name_eval="key_name"…