New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for NativeEnvironment
instead of rendering to String
#50
Comments
What would you want to use this for? It can probably be done but supporting this type of feature is relatively complex. |
TLDR: Users can define jinja templates as input to a parameter for a Lambda Function, and our library will resolve that template to any type (not just String) before handing off the resolved parameter to their lambda's business logic. Do you have an idea of where I should start poking around in minijinja to possibly make a PR, and what hangups to look out for? Longer answer: One of the key enhancements to Step Functions is that we provide a Global State, and jinja templating to reference things from global state when you send them to a specific lambda step (allowing things like list comprehensions without writing a specific lambda just for that use case). Because we are handing off resolved templates to a python function instead of HTML, it needs to resolve to any possible JSON type like |
Generally speaking I'm in favor of this but this goes beyond what I using myself. As you might be aware I'm generally using Jinja for expression expansion which is why |
I think the combination of #82 and the custom formatter support there is enough in the engine now that supports this use case. |
Hi @mitsuhiko,
I was wondering if you think its possible for this library to support jinja2's
NativeEnvironment
feature, to parse code into a type other than string.I feel like there's some magic involved in serde_json that might make this do-able, but I am also too new with rust to know whether looking into this would be a dead end 😆
The text was updated successfully, but these errors were encountered: