Created by: Deepwalker
What is this Python project?
Trafaret is a validation + conversion library. The main distinct feature of Trafaret is composability. From base Trafaret transformers and simple functions you can construct transformer of any complexity. And dict validation is not corner stone of this library.
What's the difference between this Python project and similar ones?
There is no actually similar projects or I don't know about. Trafaret is simple and yet powerful, because of monads inside, sorry. It does not count dict as a only thing that is need care about, offer strong API first and some sugar on top of strong foundation.
To combine two trafarets you just do trafaret1 & trafaret2
, or even trafaret1 | trafaret2
. And any single argument function can be treated as trafaret if it raises trafaret.DataError or return value.