Pyramid



“pay only for what you eat”

Pyramid

  • Um framework open source de desenvolvimento de aplicações web
  • Seu principal objetivo é tornar mais fácil para um desenvolvedor Python para criar aplicações web.

pyramid



Simplicidade 

Minimalismo 

Documentação 

Velocidade 

Confiança 

Abertura



O que faz o pyramid único?

Single-file applications



from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.response import Response


def hello_world(request):
    return Response('Hello %(name)s!' % request.matchdict)

if __name__ == '__main__':
    config = Configurator()
    config.add_route('hello', '/hello/{name}')
    config.add_view(hello_world, route_name='hello')
    app = config.make_wsgi_app()
    server = make_server('0.0.0.0', 8080, app)
    server.serve_forever()
   

Decorator-based configuration



from pyramid.view import view_config
from pyramid.response import Response

@view_config(route_name='fred')
def fred_view(request):
    return Response('fred')

Pyramid

By Gabi Cavalcante

Pyramid

  • 451