Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
from pyramid.response import Response
from pyramid.config import Configurator
from pyramid.view import view_config
from wsgiref.simple_server import make_server
#from pyramid.session import UnencryptedCookieSessionFactoryConfig
#from pyramid.authentication import AuthTktAuthenticationPolicy
#from pyramid.authorization import ACLAuthorizationPolicy
def my_view(request):
return Response('hello')
if __name__ == '__main__':
# authn_policy = AuthTktAuthenticationPolicy(secret='s0secret')
# authz_policy = ACLAuthorizationPolicy()
# session_factory = UnencryptedCookieSessionFactoryConfig('itsaseekreet')
config = Configurator(
# session_factory=session_factory,
# authentication_policy=authn_policy,
# authorization_policy=authz_policy
config.add_route('home', '/')
app = config.make_wsgi_app()
server = make_server('', 8080, app)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment