1
votes
    class Foo(Base):
        __tablename__ = 'foo'
        id = Column(Integer, Sequence('foo_id_seq'), primary_key=True)
        bar = Column(String(10))

Is it possible to reflect the name of the the sequence foo_id_seq from Foo.c ?

1

1 Answers

1
votes

If by Foo.c you mean an instance of Foo then:

f = Foo()
print(f.__table__.c['id'].default.name)