I have a table which is being mapped with SqlAlchemy. In that table is a UUID column. When I try to query that table, I get the uuid in bytes_le format. Is there some way I can tell the mapper to return a clean string representation instead? Code for the mapper is:
Practice = Table('Practice',metadata,
schema='pulse',autoload=True, autoload_with=engine, quote_schema=True)
class PracticeMap(object):
def __str__(self):
return "%s" % self.Name
def __repr__(self):
return "Name: %s, UUID: %s" % (self.Name, self.uuid)
mapper(PracticeMap,Practice)
Thanks.