swansonk14 / typed-argument-parser

Typed argument parser for Python
MIT License
494 stars 40 forks source link

[Feature request] Easy transition from existing code using argparse #107

Open user202729 opened 1 year ago

user202729 commented 1 year ago

Maybe something like this?

from tap import convert_to_tap_class  # or something

# existing code...
parser = ArgumentParser(...)

print(convert_to_tap_class(parser))  # automatically generates Python code
swansonk14 commented 1 year ago

Hi @user202729,

Thank you for suggesting this feature! We agree that this would be a nice addition. We would welcome a PR from you or anyone else interested in implementing this feature.

Best, Jesse and Kyle