What type is used to store byte strings in SQLAlchemy?

Use the LargeBinary type, which will use the bytea type on PostgreSQL. You can also use the BYTEA type directly if you’re only going to use PostgreSQL.

There are other SQL standard types, such as BINARY, but it’s typically easier to use LargeBinary since SQLAlchemy will use the preferred type for each database.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)