Remix.run Logo
keithasaurus 3 days ago

Updating my validation library for python, koda-validate (https://github.com/keithasaurus/koda-validate).

Focusing on ergonomics improvements. Just released an improvement to the __repr__ for Invalid types.

Potentially working on expanding the ability to generate validators from arbitrary typehints, ie `get_typehint_validator(list[str | int])`. It has good coverage, but I suspect I'm blind to some obvious holes. Would love feedback!

anshumankmr 3 days ago | parent [-]

Pydantic already covers type-driven validation and it works well enough. What is the main value add in Koda? Just curious.

keithasaurus 3 days ago | parent [-]

It's not the core of koda-validate, and yeah lots of libraries have a similar capacity. Feedback I'd be interested in is if there are gaps.

In general the value prop of koda-validate is that it turns validation into typesafe building blocks, which makes validators very re-usable -- and flexible. Some other notable differences from pydantic are that it doesn't `raise` on validation errors, you don't need a typing plugin, and it's fully asyncio-compatible.