Created
March 3, 2010 21:05
-
-
Save thruflo/321022 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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