It will be in the format W ell- K inown B ; you can use geoalchemy2.functions.ST_AsText to convert them to WKT text format.
This will work in the database itself, so you must apply this to your query in order to query the results in WKT instead of WKB; that is, in your SQLAlchemy you choose
Model.column.ST_AsText()
or
ST_AsText(Model.column)
For databaseless conversions between WKT and WKB, you can use the shapely module. Note that wkb functions require binary, not hex:
from shapely import wkb, wkt from binascii import unhexlify >>> binary = unhexlify(b'0101000000fe47a643a7f3494049f4328ae5d61140') >>> binary b'\x01\x01\x00\x00\x00\xfeG\xa6C\xa7\ xf3I@I \xf42\x8a\xe5\xd6\ x11@ ' >>> point = wkb.loads(binary) >>> point.x, point.y (51.903542, 4.45986) >>> wkt.dumps(point) 'POINT (51.9035420000000016 4.4598599999999999)'
source share