dmulyalin / ttp

Template Text Parser
MIT License
350 stars 34 forks source link

Config generation from TTP template #102

Closed tiru-badipatla closed 10 months ago

tiru-badipatla commented 1 year ago

Hi,

for one of the use cases, we need to generate a config by passing the device config and TTP template as inputs to the TTP parser.

However, currently, the TTP parser is giving only the values for the variables declared in the template in various formats like JSON, CSV etc.

could you please provide some pointers which meet my use case requirements?

dmulyalin commented 1 year ago

Hello, you can try using vars variable when instantiating TTP parser object to pass any variables into the template - https://ttp.readthedocs.io/en/latest/API%20reference.html#ttp.ttp