Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Morepath Introduction at PyZurich
Search
Denis Krienbühl
March 02, 2016
Technology
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Morepath Introduction at PyZurich
An introduction to Morepath, the web microframework with super powers.
Denis Krienbühl
March 02, 2016
Other Decks in Technology
See All in Technology
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
1
860
10年後、Engineering 行為を剥奪されるとして、わたしたちは、どう、何を創ればいいだろうか。 / If Engineering Is Taken Away in 10 Years, How and What Should We Create?
bitkey
PRO
1
190
エンタメ企業のM&Aを支えるデータ基盤 ― 統合から店舗のリアルタイム分析まで / Data Engineering Summit 2026
genda
0
170
20261017福岡devIO 「AIは"良いダッシュボード"を作れるか?
jtakeda
0
140
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
340
1つのリクエストを追って理解する - llm-dのP/D分離
akhino
1
160
日本語に強いオープンな大規模言語モデル「LLM-jp」
odashi
4
1.1k
会社説明資料
persolserverworks
0
9.8k
『SAR衛星データ解析入門』のご紹介とその応用
syuchimu
0
120
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
160
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
770
WasmをRustにする
sansantech
PRO
0
250
Featured
See All Featured
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
570
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
490
So, you think you're a good person
axbom
PRO
2
2.2k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
The SEO Collaboration Effect
kristinabergwall1
1
590
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
570
Typedesign – Prime Four
hannesfritz
42
3.2k
Why Our Code Smells
bkeepers
PRO
340
58k
The agentic SEO stack - context over prompts
schlessera
0
970
Automating Front-end Workflow
addyosmani
1369
210k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
220
Transcript
Morepath! Sheesh, another web-framework? is this #jszurich or what?
Why not Morepath?
I am Morepath contributor #2* *with 38 out of 999
commits
So what is Morepath? A web micro-framework with superpowers!
• First commits in 2013 • Created by Martijn Faassen
• LXML • Fanstatic • Zope Morepath History
• Morepath is a child of Zope • Pyramid is
a child of Zope Morepath Lineage
Features that set it apart. • Change/extend all the things.
• Change/extend all the things. • Models and views separated.
Features that set it apart.
• Change/extend all the things. • Models and views separated.
• Paths are first class citizens. Features that set it apart.
• Change/extend all the things. • Models and views separated.
• Paths are first class citizens. • REST first. Features that set it apart.
Boooring! Let’s look at some code!
Defining an App import morepath class App(morepath.App): pass
Defining a Model class Page(object): def __init__(self, id, title): self.id
= id self.title = title
Defining a Path @App.path(path='page/{id}', model=Page) def get_page(id): return Page(id) /page/about
/a/file
Defining a View @App.html(model=Page) def view_page(self, request): return ‘<p>%s</p>’ %
self.title @App.json(model=Page) def view_page(self, request): return {‘title’: self.title} or
import morepath class App(morepath.App): pass class Page(object): def __init__(self, id,
title): self.id = id self.title = title @App.path(path='page/{id}', model=Page) def get_page(id): return Page(id, title=id) @App.html(model=Page) def view_page(self, request): return ‘<p>%s</p>’ % self.title This totally fits
Extensibility No more pull requests!
No More Pull Requests from someblog import App, Page, get_page
class MyApp(App): pass @MyApp.path(path='page/{id}', model=Page) def get_my_page(id): if id == 'portfolio': return Page(id='portfolio', title=…) return get_page(id) /page/portfolio
My HTML > Your HTML from someblog import App, Post,
view_post class MyApp(App): pass @MyApp.html(model=Post, template=‘custom.pt’) def my_view_post(self, request): return view_post(self, request)
But I *need* this from someblog import App, Post class
MyApp(App): pass @MyApp.html(model=Post, name='extra') def my_extra_view(self, request): … /post/morepath-rocks/extra
Links The best thing since sliced bread
How Others Link @app.route('pages/{id}', name='pages_route') … request.link(‘pages_route’, id=page.id)
How It Should Be Done @app.path(path='/pages/{id}', model=Page) … request.link(my_page)
Models, Views A case for separation
How Others Do It @app.route('/pages/{id}') def view_page(request, id): page =
query_page(request, id) if page is None: raise HTTPNotFound() return {'title': page.title}
How It Should Be Done @App.path(‘/pages/{id}’, model=Page) def get_page(request, id=0):
return query_page(request, id) @App.json('/pages/{id}') def view_page(self, request): return {'title': self.title}
• Inherit all the views. Model View Separation !
• Inherit all the views. • Write generic views. Model
View Separation !
• Inherit all the views. • Write generic views. •
Very easy to add a REST API. Model View Separation !
More Features OMG!
• Override core Morepath. Amuse-buche
• Override core Morepath. • Model driven permissions. Amuse-buche
• Override core Morepath. • Model driven permissions. • Exception
views. Amuse-buche
• Override core Morepath. • Model driven permissions. • Exception
views. • Link to other applications. Amuse-buche
• Override core Morepath. • Model driven permissions. • Exception
views. • Link to other applications. • Mount other applications. Amuse-buche
The State of Morepath World dominance or else!
The End morepath.readthedocs.org
[email protected]
@href_ speakerdeck.com/href/morepath-introduction-at-pyzurich