trogon icon indicating copy to clipboard operation
trogon copied to clipboard

feat: Add support for Typer

Open evanmags opened this issue 2 years ago • 2 comments

Hey @willmcgugan, You don't have a CONTRIBUTING.md on this repo, so I'm not sure if/how I can contribute to this, but these are the changes I made on my fork to get Trogon working in my Typer app. I have a few TODOs below but would like your input for desired usage and best practice. Thank you 🙏

TODO:

  • [ ] match desired usage
  • [ ] tests based on best practice

evanmags avatar May 22 '23 14:05 evanmags

Removed the dependency requirement on typer and created an extra for it. This pattern of init_tui(app) feels more intuitive than shoehorning the decorator to work with a library that suggests creating many nested apps.

I'm weighing the benefits of being able to add this to a single command in typer, as the pattern set out in the docs would be to create a nested app for that.

evanmags avatar May 22 '23 17:05 evanmags

Hi @darrenburns - I made a PR against @evanmags' branch fixing the docs. When he merges that, your review will be included; is there anything else that needs to be done to make this land?

mgielda avatar Dec 28 '23 16:12 mgielda