danieldaeschle / swapy

Easy and modular web development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Regex for Routing

100Errors opened this issue · comments


  • Feature

Hey there,
what about regular expressions for routing? or something like:

def newParam(args):

    return args['param_id']

or optional parameters:

def optionalParam(args):

    return args['param_id'];

'/api/v1/{param_id}/new' isn't regex. it's just url parameters. yes it is supported.

optional parameters can be achieved by using two routes.

def something(): pass

Do you mean something like: \/api(\/v1)? to match /api/v1 and /api as example?

I mean both :)