I am trying to make a parser of file paths that follow an arbitrary naming convention.
I am wanting to take an arbitrary string.Template and get the re.Match.groupdict() corresponding to a string that follows the string.Template. I would also like to specify the delimiter of the string template such as $Name1-$Name2 or $Name1_$Name2 both returning {'Name1': 'foo', 'Name2': 'bar'} for the respective inputs.
It would also be nice to be able to have a syntax for specifying a non-capture group such as $[ignore]_$keep resulting in {'keep': 'foo'}.
Found a package called lucidity that does exactly what I need.