working example for the first question: from sqlalchemy import Sequence, create_engine, MetaData
if __name__ == "__main__": md = MetaData() e = create_engine('postgresql://rforkel@/test1', echo=True) md.bind = e s = Sequence('name', metadata=md) md.create_all() print list(e.execute(s.next_value()))[0][0] On Tue, May 29, 2012 at 8:58 AM, Chris Withers <ch...@simplistix.co.uk> wrote: > Hi All, > > How do I create a postgres sequence independent of a table using sqlalchemy? > > How do I select the next value from a sequence that forms part of a postgres > table, starting with the SQLAlchemy Table object? > > cheers, > > Chris > > -- > Simplistix - Content Management, Batch Processing & Python Consulting > - http://www.simplistix.co.uk > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to sqlalchemy@googlegroups.com. > To unsubscribe from this group, send email to > sqlalchemy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.