Skip to content
This repository has been archived by the owner on Apr 6, 2024. It is now read-only.

Requiring that only one of two Options are required? (Union types are not supported) #137

Answered by tiangolo
1npo asked this question in Questions
Discussion options

You must be logged in to vote

This is probably a question for Typer, not for Typer-CLI. And now Typer includes all the logic and Typer-CLI command, so everything should go there.

Now, about your question, this functionality is provided by Click, so, as Click doesn't support more than one type, Typer can't do much about it. Maybe in the future I'll be able to optionally depend on Pydantic and extend the possibilities of what types are supported. But for now, it's not possible. 🥲

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tiangolo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants
Converted from issue

This discussion was converted from issue #61 on April 06, 2024 22:44.