print “About Me”

Francis Addai (amoeba),
Student at KNUST

twitter: @faddai
email: 4addai@gmail.com
blog: http://faddai.tumblr.com
Overview

✔
  What is Pyramid?
✔
  Pyramid vs. Other Frameworks
✔
  The Community & Resources
✔
  Geekry!

Demo & Questions
What is Pyramid
●   An open source web framework
 ● Easier to create arbitrary web apps


 ● Can be used to build wide array of

    applications
 ● Simple Blogs, CMS, Social Web Apps


...etc
What makes Pyramid Awesome
●   Pyramid is a fast and flexible web framework
●   Beats similar web frameworks in many
    performance metrics
●   Component Architecture
●   More choices and flexibility
●   Learn from and contribute back to the Pylons
    Community
Brief History
 Well, sadly enough I hate history

 Pylons + Repoze.bfg
Brief History
●   Pylons,TurboGears, Django(2005-)
●   Repoze.bfg (2008-2010) 
●   Influenced by Zope* (1998?-)
●   Pylons, Repoze.bfg, TG merge into The Pylons
    Project (2010)
●   A collection of web related Python projects under
    a single umbrella
●   Pylons development discontinued
●   Repoze.bfg renamed to Pyramid
●   Pyramid currently the main web framework
Getting started

●   $ virtualenv env
●   $ cd env
●   $ source bin/activate
●   $ easy-install pyramid [nose]
●   $ pcreate -s starter HelloWorld
Your first Web Application
The Pyramid Tenets
 ●   Simplicity
 ●   Minimalism
 ●   Documentation
 ●   Reliability
 ●   Openness
 ●   Speed

 *https://www.pylonsproject.org/projects/pyramid/about
Simplicity
"Only pay for what you eat"
 
  ● Not forced to user any particular technology


  ● No DB


  ● SQL


  ● MongoDB




All okay
Easy to set up basic apps
Minimalism
Relatively small code base (~5000 lines)
Django ~60,000 lines
 
Concentrates on common core activities:
  ● URL mapping,


  ● templating,


  ● security,


  ● serving static assets
Documentation
Every aspect of the framework is documented
 
    ●   Coverage is good, but sometimes lacks good 
        examples
    ●   Improving over time
    ●   You can learn by examples too on github, clone 
        and just hack away.


    https://docs.pylonsproject.org/
Reliability
    ●   Tested exhaustively
    ●   100% code test coverage
    ●   “If it ain’t tested, it’s broke"
    ●   Source code has good examples of well written tests
 
Unit testing is very important.
Openness
"As with Python, the Pyramid software is distributed
under a permissive open source license."
 
  ● Active community


  ● Main developers Chris McDonough, Ben Bangert, and

    others respond to question frequently
  ● Growing library of open source pyramid related

    projects
Speed
Core functionality is optimized for very fast execution

    ●   Hardware maybe cheap these day
    ●   The time and energy needed to manage all that 
        hardware is not so cheap



 
Two methods of routing requests
URL Dispatch
  ● Simple pattern matching


  ● Maps a view function to a URL pattern


Traversal
  ● Analogous to opening a file/directory in your OS's file

    system
  ● Stick with URL Dispatch if you're a beginner


 Templating Engine
  ● Chameleon and Mako support


  ● I prefer Mako's syntax


 
Community
Community Contributions 
  ● Pyramid projects on Github


  ● Best way to learn (other than documentation) 


Many pyramid_* packages and continuing to grow
 
Google Group
http://groups.google.com/group/pylons-discuss
IRC: #pylons on Freenode

C4ainaction-Introduction to the Pyramid Web Framework

  • 1.
    print “About Me” FrancisAddai (amoeba), Student at KNUST twitter: @faddai email: 4addai@gmail.com blog: http://faddai.tumblr.com
  • 2.
    Overview ✔ Whatis Pyramid? ✔ Pyramid vs. Other Frameworks ✔ The Community & Resources ✔ Geekry! Demo & Questions
  • 3.
    What is Pyramid ● An open source web framework ● Easier to create arbitrary web apps ● Can be used to build wide array of applications ● Simple Blogs, CMS, Social Web Apps ...etc
  • 4.
    What makes PyramidAwesome ● Pyramid is a fast and flexible web framework ● Beats similar web frameworks in many performance metrics ● Component Architecture ● More choices and flexibility ● Learn from and contribute back to the Pylons Community
  • 5.
    Brief History Well,sadly enough I hate history Pylons + Repoze.bfg
  • 6.
    Brief History ● Pylons,TurboGears, Django(2005-) ● Repoze.bfg (2008-2010)  ● Influenced by Zope* (1998?-) ● Pylons, Repoze.bfg, TG merge into The Pylons Project (2010) ● A collection of web related Python projects under a single umbrella ● Pylons development discontinued ● Repoze.bfg renamed to Pyramid ● Pyramid currently the main web framework
  • 7.
    Getting started ● $ virtualenv env ● $ cd env ● $ source bin/activate ● $ easy-install pyramid [nose] ● $ pcreate -s starter HelloWorld
  • 8.
    Your first WebApplication
  • 9.
    The Pyramid Tenets ● Simplicity ● Minimalism ● Documentation ● Reliability ● Openness ● Speed  *https://www.pylonsproject.org/projects/pyramid/about
  • 10.
    Simplicity "Only pay forwhat you eat"   ● Not forced to user any particular technology ● No DB ● SQL ● MongoDB All okay Easy to set up basic apps
  • 11.
    Minimalism Relatively small codebase (~5000 lines) Django ~60,000 lines   Concentrates on common core activities: ● URL mapping, ● templating, ● security, ● serving static assets
  • 12.
    Documentation Every aspect ofthe framework is documented   ● Coverage is good, but sometimes lacks good  examples ● Improving over time ● You can learn by examples too on github, clone  and just hack away. https://docs.pylonsproject.org/
  • 13.
    Reliability ● Tested exhaustively ● 100% code test coverage ● “If it ain’t tested, it’s broke" ● Source code has good examples of well written tests   Unit testing is very important.
  • 14.
    Openness "As with Python,the Pyramid software is distributed under a permissive open source license."   ● Active community ● Main developers Chris McDonough, Ben Bangert, and others respond to question frequently ● Growing library of open source pyramid related projects
  • 15.
    Speed Core functionality isoptimized for very fast execution ● Hardware maybe cheap these day ● The time and energy needed to manage all that  hardware is not so cheap  
  • 16.
    Two methods ofrouting requests URL Dispatch ● Simple pattern matching ● Maps a view function to a URL pattern Traversal ● Analogous to opening a file/directory in your OS's file system ● Stick with URL Dispatch if you're a beginner  Templating Engine ● Chameleon and Mako support ● I prefer Mako's syntax  
  • 17.
    Community Community Contributions  ● Pyramid projects on Github ● Best way to learn (other than documentation)  Many pyramid_* packages and continuing to grow   Google Group http://groups.google.com/group/pylons-discuss IRC: #pylons on Freenode