There are a lot of options already available, however for any kind of use case it's probably a good idea to also have a way to provide the pydantic model.
A simple concept could be to directly use the function, which (after decoration) is actually a Command instance:
The idea of storing a reference to the model is not amazing, but I currently don't see drawbacks. It could also be made optional via flag argument, e.g. command(store_config=True), in the future to solve any possible issue.
There are a lot of options already available, however for any kind of use case it's probably a good idea to also have a way to provide the pydantic model. A simple concept could be to directly use the function, which (after decoration) is actually a
Command
instance:The idea of storing a reference to the model is not amazing, but I currently don't see drawbacks. It could also be made optional via flag argument, e.g.
command(store_config=True)
, in the future to solve any possible issue.