PyFacebook is currently best-tested with Django, and if you are just starting out with Python web development, the author highly recommends this combination :-). If you'd rather use another framework, there are also Pylons and other WSGI helpers in PyFacebook as well.
This documentation describes the profiler functionality provided in the modules cProfile, profile and pstats. This profiler provides deterministic profiling of Python programs. It also provides a series of report generation tools to allow users to rapidly examine the results of a profile operation.