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
Support for parsing from YAML file #136
Comments
Thanks for the question, and offering to submit a PR. The answer is probably no, sorry. The reason is that on reflection I think that
So instead of this, I think it would be better to add a section to the help docs demonstrating how to load data from numerous different formats. Does this make sense? |
That makes perfect sense. I hadn't seen any discussion on adding YAML in the issue tracker or other PR's so I wanted to raise it here, but I definitely see your reasoning for not wanting to add it. Thanks for taking the time to explain. |
If you remove parsing from pydantic, what will happen with |
Since this feature is specifically out-of-scope for Pydantic, and I couldn't find a good implementation of YAML parsing/dumping, I made the pydantic-yaml library. I made it to suit my needs, but if something's missing - feel free to make a feature request or PR. |
Informative issue thanks @samuelcolvin |
FYI, you can look at 1.0.0-alpha.1 version which removes mixins and works with normal Pydantic models. I would also appreciate the feedback on usability vs the stable version. |
* testing with hypothesis * add failing case * 3.7 compat * 3.7 compat, take 2 * use hypothesis settings profiles * add failing hypothesis cycles * suggested branch_models_with_cycles * hypothesis generating cyclic references * fix recursive hypothesis tests * check errors
Hello, and thanks for creating this wonderful library. I was wondering if you would merge a PR that added YAML as a possible parsing protocol? Seems fairly trivial to add in
parser.py
, but I wanted to check with you before doing the work. (I would implement usingpyyaml
unless you think another one would be better)The text was updated successfully, but these errors were encountered: