1 from wsgiref.simple_server import make_server
2from pyramid.config import Configurator
3from pyramid.response import Response
4
5def hello_world(request):
6 return Response('Hello World!')
7
8if __name__ == '__main__':
9 with Configurator() as config:
10 config.add_route('hello', '/')
11 config.add_view(hello_world, route_name='hello')
12 app = config.make_wsgi_app()
13 server = make_server('0.0.0.0', 6543, app)
14 server.serve_forever()
15