Hi.
I'm a programmer from Russia with strong skills in Python.
I suggest to use ORM to enter data from search. SQLAlchemy is a good tool for such a purpose. It provides thread-safe tools and helps to convert data from relational model to object-oriented.
If this isn't an option, I can use raw SQL requests and psycopg2 as a library to connect to the database.
If you're interested, feel free to contact me.
All the best,
Sergey.