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