Open egpbos opened 1 month ago
@stefsmeets We talked today about attrs
and how you used it for nested-yaml / dataclass validation and preferred it over Pydantic. In this PR, I happened to add a bit of text on Pydantic. I haven't looked at attrs yet, but do you think it makes sense to mention it in here as well? Or does it deserve a topic of its own? Is schema / data validation perhaps a useful topic for a section of the data chapter?
I think it makes sense, I find attrs to be much more approachable than pydantic. The attrs docs have a really nice section on comparing the different tools: https://www.attrs.org/en/stable/why.html
Briefly browsing PROTEUS' use of attrs, it seems like a nice lightweight tool for value validation. I'm not sure how (or even if) Pydantic handles this, but certainly seems useful. I don't think it should go under this PR, though, it's a topic independent of type hints.
Whoops, missed your comment @stefsmeets before posting mine just now. Agree, it looks nice and lightweight. Lets make a separate issue.
Added a subsection on type hints, following the discussion in #310. Also added a few cool libraries, e.g. FastAPI that was mentioned by Bouwe in #54 and Typer from the same author.
Fixes #310.
Checklist
SIGNIFICANT changes / additions, e.g. new chapters
ALL contributions
python3 -m http.server 4000
and confirmed they work correctly.docker run --init -it -v `pwd`:/docs lycheeverse/lychee /docs --config=docs/lychee.toml
, at least for the files I changed.CITATION.cff
file.