IndianOpenSourceFoundation / dynamic-cli

A Modern, user-friendly command-line HTTP client for the API testing, and if you're stuck - Search and browse StackOverflow without leaving the CLI
https://pypi.org/project/dynamic-cli/
GNU General Public License v3.0
168 stars 120 forks source link

Switch from `argparse` to Typer #183

Open pybash1 opened 2 years ago

pybash1 commented 2 years ago

🚀 Feature

Use Typer instead of argparse

Have you read the Contributing Guidelines on Pull Requests?

Yes

Motivation

I have made applications using both Typer and argparse, and the developer and user experience with Typer is far better in my opinion.

Pitch

This feature reduces a lot of code and also uses modern features like decorators for sub-command handlers, etc. It is cross platform. It will reduce code complexity, allowing new and beginner programmers to contribute.

github-actions[bot] commented 2 years ago

Hi👋 thanks for creating your first issue for IOSF, Will get back to you soon !.

GouravSardana commented 2 years ago

@pybash1 Thanks for your wonderful advice. Can you show me some of the packages which uses this thing ? we need more clarity before moving to any parser. cc @pranavbaburaj @PradyumnaKrishna @peb-peb

pybash1 commented 2 years ago

@GouravSardana It's hard for me to remember an example right now, but if I can remember any, I will let you know.

peb-peb commented 2 years ago

I played around with Typer and it's a wonderful tool, but refactoring and moving from argparse to Typer is a negative from my side. Because even if we refactor the code, it would not change anything major and add to the dependency of the project.

Typer does bring a method for autocompletion in the terminal itself, but it's not the kind of autocomplete that we're looking for (we're looking for the TAB completion style of autocompletion).

But, in it's defense, I would say that it's really beginner-friendly, easy to implement, and has many awesome features.

@GouravSardana @pranavbaburaj what's your opinion on this?

lainq commented 2 years ago

I would be totally fine with porting to typer, if everyone's happy with the decision.

GouravSardana commented 2 years ago

We're not in favour of moving from argparser to Typer.

cc @pranavbaburaj