I've just released v0.5.1 of pyramid_route_7. it is compatible with 3.6-3.13
pyramid_route_7 offers a microtemplating language for creating more maintainable routes in pyramid:
For example, kv patterns can be created, such as these for matching date components:
config.include("pyramid_route_7")
config.add_route_7_kvpattern("year", r"\d\d\d\d")
config.add_route_7_kvpattern("month", r"\d\d")
config.add_route_7_kvpattern("day", r"\d\d")
Which can then be reused across multiple routes with a readable syntax:
config.add_route_7("calendar", "/calendar/{@year}/{@month}/{@day}")
This is equivalent to invoking:
config.add_route("calendar", r"/calendar/{year:\d\d\d\d}/{month:\d\d}/{day:\d\d}")
A jsonify parameter will also create a secondary json route:
config.add_route_7("calendar", "/calendar/{@year}/{@month}/{@day}", jsonify=True)
Which is equivalent to invoking:
config.add_route("calendar", r"/calendar/{year:\d\d\d\d}/{month:\d\d}/{day:\d\d}")
config.add_route("calendar|json", r"/calendar/{year:\d\d\d\d}/{month:\d\d}/{day:\d\d}.json")
Links:
Github
https://github.com/jvanasco/pyramid_route_7PyPi
https://pypi.org/project/pyramid-route-7/