Created
March 13, 2012 22:27
-
-
Save agronholm/2032214 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import * | |
from sqlalchemy.orm import * | |
from sqlalchemy.ext.declarative import * | |
Base = declarative_base() | |
class Foo(Base): | |
__tablename__ = 'foo' | |
id = Column(Integer, primary_key=True) | |
for i in range(32): | |
setattr(Foo, 'bin-%d' % i, Column(Integer)) | |
engine = create_engine('sqlite:///', echo=True) | |
Base.metadata.create_all(engine) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment