We could provide the users with an option to acquire the generated NamedTuple class objects on the fly, instead of returning strings with Python code, which need to be interpreterd.
This could be achieved in multiple ways:
- leveraging NamedTuple code (probably involves the most work, should be fastest performance-wise and safest(?))
- using ast to parse the code and then eval? (seems quite hacky)
- dynamically creating a Python module, which can then be imported using importlib - similar to how the current end-to-end tests are doing that in the package - this could be slower due to I/O operations, kinda eval-ish, but simplest in implementation (since we already have a working mvp)
We could provide the users with an option to acquire the generated NamedTuple class objects on the fly, instead of returning strings with Python code, which need to be interpreterd.
This could be achieved in multiple ways: