7 ms·
What contract framework would you recommend in Python?
by sdeframond 3y ago
What contract framework would you recommend in Python?
- nerdponx 3y agoI've been dissatisfied with all of them actually! But both Deal (https://pypi.org/project/deal/ https://pypi.org/project/deal/) and icontract (https://pypi.org/project/icontract/ https://pypi.org/project/icontract/) have merit. I can't remember where I saw it, but the author of deal seemed a bit annoyed at the existence of icontract, maybe on a mailing list. I've played around with CrossHair (https://pypi.org/project/crosshair-tool/ https://pypi.org/project/crosshair-tool/) as well a bit, and that supports both deal and icontract. icontract also seems to integrate with hypothesis (https://pypi.org/project/hypothesis/ https://pypi.org/project/hypothesis/) , which deal does not do explicitly.
- sdeframond 3y agoThanks a lot! > I've been dissatisfied with all of them actually! What are some of your dissatisfaction points? Do you know of better alternatives in other languages ?
- growthwtf 3y agodeal actually has a far better integration with hypothesis as its testing strategies are built on that library! https://deal.readthedocs.io/details/tests.html#mixing-with-hypothesis https://deal.readthedocs.io/details/tests.html#mixing-with-h...