everything in python is ultimately in a namespace, the names are strings, the values are the objects.   
like if you had “myapp.model” as a module, and in that module were Study and Site, you could say:
from myapp import model
Study = getattr(model, “Study”)
same thing.
If you want to poke into the registry of class names in declarative, you can look inside of Base._decl_class_registry:
def query(clsname, colname):
    cls = Base._decl_class_registry[clsname]
    col = getattr(cls, colname)
   
   q = query(cls).filtert(cls.foo == ‘bar’).order_by(col)
this kind of thing is very easy in Python once you get the central idea that everything in Python is the same kind of object each with a name.