Currenly, pydash doesn’t support templating. Having a custom templating engine was never a goal of pydash even though Lo-Dash includes one. There already exist many mature and battle-tested templating engines like Jinja2 and Mako which would be much more suited to handling templating needs. However, how best to implement templating in pydash remains an open issue.
Here are a few options to consider:
- Provide a thin wrapper around String Format and facilitate HTML escaping but provide nothing beyond that; no code execution, no interpolate delimiters, no imports.
- Provide a thin wrapper around one of the templating libraries (i.e. choose one and make it a dependency) and defer everything to it.
- Provide an interface to a templating library so that you get pydash.template() but you set the engine yourself.
- All of the above.
- Leave templating out of pydash.
No decision has been made yet, but one will likely be made by v1.2.0 or v1.3.0.