Skip to content
Advertisement

Tag: model

How to query database by id using SqlAlchemy?

I need to query a SQLAlchemy database by its id something similar to but for id. How do I do this? [Searching over Google and SO didn’t help] Answer Query has a get function that supports querying by the primary key of the table, which I assume that id is. For example, to query for an object with ID of

Advertisement