I have an instance of a SQLAlchemy model and am trying to determine the types that the columns accept. Some of the columns attributes are None at the time I need to determine
class User(Base):
__tablename__ = "user"
id = Column(Integer, primary_key=True)
login = Column(String())
Here is an pseudo code example of what I am trying to do.
user = User()
if type(inspect(user).get_property(id)) == Integer:
print "The id column expects Integers"
How do I turn this pseudo code into real code? Thanks!