Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)
Return an instance based on the given primary key identifier,
or ``None`` if not found.

E.g.::

    my_user = session.query(User).get(5)

    some_object = session.query(VersionedFoo).get((5, 10))

:meth:`~.Query.get` is special in that it provides direct(more...)

src/j/u/june-HEAD/june/models/_base.py   june(Download)
        if len(values) == 1:
            ident = values.pop()
            rv = self.get(ident)
            if not rv:
                return {}

src/f/l/flaskbbs-HEAD/flaskcommon/auth/models.py   flaskbbs(Download)
 
        try:
            user = self.get(int(identity.name))
        except ValueError:
            user = None
    def get_profile(self, user):
        try:
            prof = self.get(int(user.id))
        except:
            prof = None