Django-SQL-Profiler is a project mainly written in Python, it's free.
Profiles X% of SQL queries based on the line that did the query
License: Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html)
Usage: see init.py