Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metavar support #47

Open
cody-mar10 opened this issue Jul 4, 2023 · 0 comments
Open

Metavar support #47

cody-mar10 opened this issue Jul 4, 2023 · 0 comments

Comments

@cody-mar10
Copy link

Hi great project! I was wondering if it is possible to implement something similar to the argparse packages metavar argument. I strongly prefer my arguments to specify what type should be input, and I would think this is doable since the pydantic backend is already keeping track of types.

Envision something like this:

from pydantic import BaseModel, Field, FilePath

class Args
    intarg: int = Field(..., description="an integer")
    file: FilePath = Field(..., description="a file")

then at cli:

./example_program.py --help

--intarg INT:    an integer
--file FilePath: a file
@cody-mar10 cody-mar10 changed the title Metavar support - Feature request Metavar support Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant