[sqlalchemy] Bulk update using multi threading and exception handling

2014-07-22 Thread Milind Vaidya
I am developing a back-end scripts to populate a bunch of tables. 1. dbinterface.py : contains all mapper classes and DBHandler class which has required static methods for queries. e.g. class Destination(Base): __table__ = Base.metadata.tables['destination'] @staticmethod def

[sqlalchemy] [SQLAlchemy-migrate] Add a TSVectorType column to 4 existing tables

2014-07-22 Thread Yoann Mouscaz
Hi ! Does somebody here can tell me something about database migration with SQLAlchemy-migrate on a TurboGears application please ? In fact I want to add a column containing a TSVectorType ( http://sqlalchemy-searchable.readthedocs.org/en/latest/) to 4 of my existing tables and I’m not sure

Re: [sqlalchemy] Bulk update using multi threading and exception handling

2014-07-22 Thread Michael Bayer
On Jul 22, 2014, at 7:47 AM, Milind Vaidya kava...@gmail.com wrote: I am developing a back-end scripts to populate a bunch of tables. 1. dbinterface.py : contains all mapper classes and DBHandler class which has required static methods for queries. e.g. class Destination(Base):

[sqlalchemy] Re: condition on every query

2014-07-22 Thread mail
I had the same problem and decided to look into implementing a custom relationship like you suggested. I'll post what I have here in case anyone else has the same problem. :) The first thing I noticed was the query_class attribute on the RelationshipProperty class. If you don't want to

Re: [sqlalchemy] Updating children of a one-to-many bi-directional relationship

2014-07-22 Thread Bala Ramakrishnan
Hi Michael, thanks for the reply. I thought I had tested the code, but I did not do so properly. The essence of the logic I posted works. Here are the few corrections: You are right that I should not use strings for partition_id when it is defined as integer. This is a piece of test code I

[sqlalchemy] SQLAlchemy 0.8.7 Released

2014-07-22 Thread Michael Bayer
Hey list - SQLAlchemy release 0.8.7 is now available. Release 0.8.7 contains a selected set of bug fix backports from release 0.9, including a selected set of ORM and extension fixes as well as dialect fixes for MySQL, Postgresql, and SQL Server. Users should carefully review the Changelog

[sqlalchemy] SQLAlchemy 0.9.7 Released

2014-07-22 Thread Michael Bayer
Hey list - SQLAlchemy release 0.9.7 is now available. The 0.9 series is now entering maintenance mode where major new features are now targeted at the 1.0 series. Release 0.9.7 contains a wide range of bugfixes, many of which are identified as regressions from previous 0.9.X releases

[sqlalchemy] flake8 tips?

2014-07-22 Thread Jonathan Vanasco
i recently introduced flake8 testing into our automated builds. (an idea inspired by mike bayer) i already ran into an issue with Flake8 generating errors for ` == True` comparisons ( which are required under SqlAlchemy) does anyone have any tips/tricks/gotchas for dealing with flake8 in

RE: [sqlalchemy] flake8 tips?

2014-07-22 Thread Michael Nachtigal
You can try adding # nopep8 or # noqa at the end of any line to suppress pep8/flake8 messages for that line. There may be more in the docs about this about how to suppress which errors specifically: https://pypi.python.org/pypi/flake8 --Mike From:

Re: [sqlalchemy] flake8 tips?

2014-07-22 Thread Jonathan Vanasco
thanks. I already added `# noqa` to those lines. that pep8 test is actually bad, digging into the docs, it's actually recommending the worst case format. there's a bunch of debate on it in a github ticket. do you know of any other odd behaviors? -- You received this message because you

Re: [sqlalchemy] Multiple tables and foreignkey constraints

2014-07-22 Thread Ken Roberts
If I'm understanding correctly, something like the following: # Keep track of manufacturer names manufacturers_table = Table(u'manufacturer', metadata, Column(u'id', Integer, primary_key=True, Column(u'name', String(20)) ) # Keep track of model names models_table = Table(u'model',