[wingide-users] SQLAlchemy support?
support at wingware.com
Tue Jun 15 09:29:27 MDT 2010
Marcin Krol wrote:
> Hello everyone,
> I'm spending a lot of time developing with SQLAlchemy toolkit, which
> is arguably the most popular Python ORM toolkit.
> Sadly, wing doesn't seem to be able to infer most of the sqla stuff,
> e.g. I have:
> rsvp = session.query(Project.project,
> ..and wing says
> Symbol: rsvp
> Cannot determine type
> SQLA objects are complex and it would be very useful to be able to
> look into them. Debugging just to look the contents of the object up
> is not always convenient, esp. with mod_python.
SQLAlchemy is written in a very dynamic way so it's difficult to analyze
that code statically. You could add the following so Wing knows what
from sqlalchemy.orm.session import Session
Similarly for rsvp:
from sqlalchemy.orm.query import Query
If there are many places where you call sessionmaker() and
session.query() you could write a wrapper that includes these
isinstance() calls rather than sprinkling isinstance all over the place.
Wingware | Python IDE
Advancing Software Development
More information about the wingide-users