Support for yarl.URL and/or pydantic.HttpUrl #989
-
First Check
Commit to Help
Example Codeimport typer
import pandas as pd
from yarl import URL
def main(csv_url: URL):
chunked_dataframe = pd.read_csv(str(csv_remote_path), ...)
...
if __name__ == '__main__':
typer.run(main) Description
Currently, Typer would raise the following exception for both cases yarlRuntimeError: Type not yet supported: <class 'yarl.URL'> pydantincRuntimeError: Type not yet supported: <class 'pydantic_core._pydantic_core.Url'> Operating SystemmacOS Operating System DetailsNo response Typer Version0.12.5 Python Version3.12 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Answered by
YuriiMotov
Sep 15, 2025
Replies: 1 comment 1 reply
-
You can make it working by specifying a parser for this type: https://typer.tiangolo.com/tutorial/parameter-types/custom-types/#type-parser |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
joyanedel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can make it working by specifying a parser for this type: https://typer.tiangolo.com/tutorial/parameter-types/custom-types/#type-parser