mirror of
https://github.com/vinta/awesome-python.git
synced 2026-03-17 20:51:05 -05:00
[PR #1022] [CLOSED] Add trafaret library #925
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/vinta/awesome-python/pull/1022
Author: @Deepwalker
Created: 2/14/2018
Status: ❌ Closed
Base:
master← Head:trafaret📝 Commits (1)
a68ca58Add trafaret library📊 Changes
1 file changed (+1 additions, -0 deletions)
View changed files
📝
README.md(+1 -0)📄 Description
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 eventrafaret1 | trafaret2. And any single argument function can be treated as trafaret if it raises trafaret.DataError or return value.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.