desert
desert copied to clipboard
What about other validation libraries?
Python has a bunch of validation libraries. They're mostly the same, but each one has a different ecosystem.
A comment: Competition is good for pushing each one to get better, but it comes at a cost.
- There's a lot of duplicated effort by the maintainers of those libraries.
- Partitioning the users means each user base loses out on some features. For example, users of Marshmallow can use OpenAPI schemas with the apispec library from the Marshmallow ecosystem, but users of Typesystem and Colander can generate HTML forms. As a user, picking one library means losing out on some set of features from the ecosystem, even if the libraries themselves were feature-equivalent.
How could this problem be solved?

-
Make one library that's way better than all the others, and then the ancillary ecosystem libraries will move to support it. Requests is like this, maybe? Try to think of better examples of a library emerging as a clear winner due to quality and ecosystem converging on it.
-
Provide a built-in library with this functionality, and then the ancillary ecosystem libraries will move to support it. The trouble is that after a few years better alternatives will emerge but the standard library will be frozen.
asyncio(and many other Python standard library modules) are like this. -
Define a language-level standard API, and then all the libraries can support it interoperably.
async/awaitand the DB-API PEP are like this. -
Make a library that can convert schemas from each library to each other library. Then whatever feature you need, you can get it by just converting your schema to the other kind. odo is like this for data formats.
Are there more solutions?