Web applications have URLs which locate data and make operations on that data. Pyramid supports two ways of mapping URLs into Python operations:
As this is a tutorial at the Plone Conference, we will show building an application using traversal. Along the way, we will try to show how easy and Pythonic it is to think in terms of traversal.
Remember...traversal is easy, powerful, and useful.
With traversal, you think of your website as a tree of Python objects, just like a dictionary of dictionaries. For example:
http://example.com/company1/aFolder/subFolder/doc1/add?x=1
...is nothing more than:
>>> root['aFolder']['subFolder']['doc1'].add(x=1)