Helper library for Pyramid applications based on Traversal
Project description
TraversalKit helps you to build Pyramid applications, which use traversal as their routing method. It provides single base class Resource, which your ones should inherit. The base class has a handful of features have been done for you, which includes location-awareness, mounting resources to each-other to build a resource tree, and resource lineage inspection.
Quick example of usage:
from traversalkit import Resource, DEC_ID
class SiteRoot(Resource):
""" Root resource of your site """
@SiteRoot.mount('blog')
class Blog(Resource):
""" Blog resource will be available under the URL: /blog/ """
@Blog.mount_set(DEC_ID)
class BlogPost(Resource):
"""
Blog post resource will be available under the URL: /blog/xxx
Where ``xxx`` is a decimal number
"""
Pretty neat and simple, isn’t it? Look over the example application and library source code (it’s really compact, I swear) to learn how TraversalKit can be used.
Even though the library was developed to be used within Pyramid applications, it doesn’t have any dependencies. So if you find out that it is useful in your non-Pyramid application, feel free to get it.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for TraversalKit-0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7e1449a9e5b5458514bb74882b68f646c9626e4bd69db0cb1bf86e8ce9e5175 |
|
MD5 | 96206cad5fccc6a7fd5c88386e2680b2 |
|
BLAKE2b-256 | 6ecfc815ba4c4f71bd10901b56595b92ed05fb604e0ba68e70778db08f61f04c |