14. SMALL “Roughly 5000 lines
of code”
FAST
STABLE
15. SMALL “Roughly 5000 lines
of code”
FAST
“100% statement
STABLE
coverage via unit and
TESTED integration tests”
16. SMALL “Roughly 5000 lines
of code”
FAST
“100% statement
STABLE
coverage via unit and
TESTED integration tests”
DOCUMENTED “Literally nothing
in Pyramid
is undocumented”
17. ★ Debug Toolbar
★ Flexible authentication
and authorization
★ Tweens - a bit like WSGI
middleware
18. ★ 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')
19. ★ Event system (based on ZCA)
from pyramid.events import NewRequest
from pyramid.events import subscriber
@subscriber(NewRequest)
def mysubscriber(event):
event.request.foo = 1
20. ★ Extendable configuration
from pyramid.config import Configurator
if __name__ == '__main__':
config = Configurator()
config.include('pyramid_formalchemy')
23. Water today
★ U.S. - the largest consumer market
for bottled water in the world
★ in 2011, the market is forecast to have
a value of $86,421.2 billion
“Bottled water has become the second
largest commercial beverage category”
42. project gotchas
★ Requirements are not rock
solid (it’s a startup) - project will
grow with the customer
★ Customer is in U.S. - planning
regular meetings is essential
★ We need to find new framework
for ERP part
★ Only 5 months to delivery
47. why ?
★ architecture is not so far
away from Zope
★ it supports SQLAlchemy
out of the box
★ great documentation and
active community
★ add’s some fresh air to your
architecture
51. and ?
★ The Best CMS ever
★ easy to integrate with
other Python frameworks
★ almost 2000 addons
52. and ?
★ The Best CMS ever
★ easy to integrate with
other Python frameworks
★ almost 2000 addons
★ Diazo (plone.app.theming)
★ Poi
★ PAS (PluggableAuthService)
53. and ?
★ The Best CMS ever
★ easy to integrate with
other Python frameworks
★ almost 2000 addons
★ Diazo (plone.app.theming)
★ Poi
★ PAS (PluggableAuthService)
54. and ?
★ The Best CMS ever
★ easy to integrate with
other Python frameworks
★ almost 2000 addons
★ Diazo (plone.app.theming)
★ Poi
★ PAS (PluggableAuthService)
55. and ?
★ The Best CMS ever
★ easy to integrate with
other Python frameworks
★ almost 2000 addons
★ Diazo (plone.app.theming)
★ Poi
★ PAS (PluggableAuthService)
56. and ?
★ The Best CMS ever
★ easy to integrate with
other Python frameworks
★ almost 2000 addons
★ Diazo (plone.app.theming)
★ Poi
★ PAS (PluggableAuthService)
68. d j ang o : no!
★ less code more magic
★ not so flexible
(specification is growing)
★ using SQLAlchemy within
could be tricky
69. d r u pal: no!
★ security problems
(370 CVE entries)
★ integration is more difficult
(PHP vs. Python)
★ missing features
workflow, complex ACL, etc.
70. o pen erp : no!
★ quite complex: CRM , sales,
accounting and much more
★ not enough time
to fully investigate it
★ not a generic framework
90. ★ Prototyping - it’s always a
lot of fun, but...
★ be aware of The
Learning Curve Effect
★ Collecting specification and
keeping docs up-to-date
(a real on-going process)
92. pyramid_formalchemy
★ started by gawel (Gaël Pasgrimaud)
and supported by
★ using SQLAlchemy,
Formalchemy and fanstatic
★ available on pypi
more then 1720 downloads so far
93. pyramid_formalchemy
★ Lots of improvements during
by
★ events hooks
★ view and action customizations
★ i18n support
★ paster templates
★ fanstatic integration
97. pyramid_formalchemy
★ Events subscriptions:
@events.subscriber([User, events.IBeforeEditRenderEvent])
def before_user_edit(context, event):
fs = event.kwargs['fs']
# add roles_manage field for manager:
if not has_permission('manage', event.request):
fs.append(fs.roles_manage)
# set TinyMCE as a renderer for biography field:
fs.biography.set(renderer=tinymce)
100. fa.bootstrap
★ a pyramid_formalchemy plugin
★ based on twitter bootstrap
★ integrated with fanstatic
★ released on pypi
http://pypi.python.org/pypi/fa.bootstrap