dry-python / dry-python/returns

Consider adding validators package

Offen
#258 16 Kommentare 4 Reaktionen 1 zugewiesene Person Beansprucht von @sobolevn Auf GitHub ansehen
enhancement help wanted
Vorherrschende Sprache
Python
Sterne
4.4k
Forks
155
Ø Merge
2 Std. 27 Min.
Gemergte PRs (30 T.)
22

Beschreibung

Currently a lot of python tools just throw exceptions at us or even uses: `.is_valid()` and `.errors` properties. It is not type-safe at all. Sometimes it is hard to explain to people how to really use type-driven design and make invalid states unreachable.

My idea is that we need to write thin wrappers around popular typed validation packages: like `pydantic`, `cerebrus`, `schema`, etc to return really typed things.

We also need to think about API to be expressive and recognisable enough.

Related: https://gist.github.com/maksbotan/14b4bebda2acab98cdd158f85a970855
CC @maksbotan

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.