Guest User

Untitled

a guest
May 20th, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import gevent
  2. from gevent import monkey
  3.  
  4. # patches stdlib (including socket and ssl modules) to cooperate with other greenlets
  5. monkey.patch_all()
  6.  
  7. from sqlalchemy import create_engine
  8.  
  9. engine = create_engine('postgresql+pg8000://postgres:%s@localhost/mydb' % password)
  10. connection = engine.connect()
  11. results = connection.execute("select * from weather")
  12. for item in results:
  13. item
Add Comment
Please, Sign In to add comment