Hello,
I'm using sqlalchemy on a PSQL(9.5) DB. When I do a query(below) to the
following table:
class Molrepo(Base):
__tablename__ = 'molrepo'
id = Column(Text, primary_key=True)
molrepo_name = Column(Text, index=True)
src_id = Column(Text)
smiles = Column(Text)
inchikey = Column(Text, index=True)
inchi = Column(Text)
QUERY:
query.with_entities(Molrepo.molrepo_name, Molrepo.src_id, Molrepo.smiles,
Molrepo.inchikey, Molrepo.inchi).all()
The returned values are of type *unicode*. I would like that by default the
return values to be of type *str*. How can I do that? The DB client
encoding is already set to 'UTF-8'.
Thanks,
oriol
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.