Articles from October 2010
I will be at PgDay Europe 2010 in Stuttgart with a talk about Psycopg: Advanced PostgreSQL Access from Python with Psycopg.
The talk will be about some of the most advanced functionalities and new features available in the latest Psycopg releases: asynchronous communication, notifications, server-side cursors, advanced data mapping between Python and PostgreSQL, the upcoming support for two-phase commit and hstore objects.
If you have any suggestion about what you'd like to be shown in the talk, you may leave a feedback.
See you in Stuttgart!
Posted by Daniele Varrazzo on 2010-10-22
Tagged as recipe
In many script I write, there are functions requiring database operations. Every time I need them, I try to write such code in functions like:
@with_connection def do_some_job(cnn, arg1, arg2=None): cur = cnn.cursor() cur.execute(SQL, (arg1, arg2)) # or something else do_some_job(42, arg2='hi')