from ebus.web import model from sqlalchemy import create_engine engine = create_engine('sqlite:///:memory:', echo=True) #engine = create_engine("postgresql://yvesf:iii@10.2.2.13:5432/yvesf", echo=True) model.ModelBase.metadata.create_all(engine) from sqlalchemy.orm import sessionmaker Session = sessionmaker() Session.configure(bind=engine) session = Session() t1_sensor = model.Sensor("foosensor", "blatest") session.add(t1_sensor) for i in xrange(10000): session.add( model.Value(t1_sensor, 0.5) ) session.commit() session.close()