Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import gevent
- from gevent import monkey
- # patches stdlib (including socket and ssl modules) to cooperate with other greenlets
- monkey.patch_all()
- from sqlalchemy import create_engine
- engine = create_engine('postgresql+pg8000://postgres:%s@localhost/mydb' % password)
- connection = engine.connect()
- results = connection.execute("select * from weather")
- for item in results:
- item
Add Comment
Please, Sign In to add comment