Potentially implementing argparse #290
Replies: 5 comments 4 replies
-
@Denperidge it seems interesting! Could you show me an example of what would be possible to do with this feature? |
Beta Was this translation helpful? Give feedback.
-
It's not really clear to me, could you describe the feature a bit please? |
Beta Was this translation helpful? Give feedback.
-
Essentially, it could allow the package to support configuration through the command line. It could be implemented as a from_cli function!
For example, instead of using { “username”: “Example” } with from_json, users would be able to use script.py —username Example with from_cli, and get the exact same results!
…On 28 May 2023 at 11:36 +0200, Fabio Caccamo ***@***.***>, wrote:
It's not really clear to me, could you describe the feature a bit please?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
No problem, and sure thing! I’ll have a PR up and running in the next few days or weeks
…On 28 May 2023 at 13:11 +0200, Fabio Caccamo ***@***.***>, wrote:
Now I understand, cool! Thank you for the explanation!
Yes a from_cli method that catches CLI arguments would be perfect, want you work on a PR for this?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Excuse my wild incorrect estimation of when I could get around to this, but the PR is up! #311 |
Beta Was this translation helpful? Give feedback.
-
So, I just accidentally reinvented the wheel, but also less fancy than this wheel. 😅
For a different project I am working on, I would want this package mixed with Python's argparse to allow CLI commands. So hence my following question: is there interest in implementing argparse/CLI support? If so, I will try to at least kickstart it by checking if some code from my repo can be re-used into this project. If not, I will see whether to keep my code as is and perhaps implement Python-Benedict!
Have a nice day!
Beta Was this translation helpful? Give feedback.
All reactions