felix-martel / pydanclick

Add click options from a Pydantic model
https://felix-martel.github.io/pydanclick/
MIT License
32 stars 8 forks source link

Pydantic network types support #29

Open noirbizarre opened 3 weeks ago

noirbizarre commented 3 weeks ago

As of today, Pydantic network types, especially URLs are processed as and expected to be JSON data. The consequence is that you need to double quotes URLs types like this:

MY_URL='"https://somewhere.com"'

Is it possible to have first-class support for those types so they can be expected as string ?

[!NOTE] I can do it and submit a pull-request if this is OK for you, but I'd wait for answers on #28 to be sure to go in the right direction

felix-martel commented 3 weeks ago

Good idea! I'd be happy to accept a PR on this.