Skip to content

Dynamically create NamedTuple objects #2

Description

@mrapacz

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions