Add Pyramid support (v2)

Cleaner version. You can delete the previous pull request.