Skip to content

Instantly share code, notes, and snippets.

@thruflo
Created March 3, 2010 21:05
Show Gist options
  • Select an option

  • Save thruflo/321022 to your computer and use it in GitHub Desktop.

Select an option

Save thruflo/321022 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment