Skip to content

Instantly share code, notes, and snippets.

@hanula
Created April 23, 2013 20:55

Revisions

  1. hanula created this gist Apr 23, 2013.
    12 changes: 12 additions & 0 deletions gistfile1.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    def create_pyramid(body, headers):

    from pyramid.response import Response
    from pyramid.config import Configurator

    def hello(request):
    return Response(body, headers=headers, content_type='text/plain')

    config = Configurator()
    config.add_route('hello', '/hello/:account_id/test')
    config.add_view(hello, route_name='hello')
    return config.make_wsgi_app()