A design-by-contract Python package in ~100 lines
Greetings! A 2.5 weekends project to teach myself newer Python features (>= 3.10). Conditions are written as Lambda expressions that annotate parameters and return types, and coexist with type annotations. Symbols to share values between conditions are also supported to a limited extend.
In plain words
This is a lightweight Python package implementing design-by-contract principles, created as a learning project for Python 3.10+ features. Developers can specify preconditions and postconditions using lambda expressions that work alongside standard type annotations, with limited support for sharing values between conditions. The package is compact at approximately 100 lines of code and demonstrates contract-based programming patterns for Python development.
written from the facts on this page · September 2026
More dev tools this month
the category →



Open-source GTM skills for technical founders
Dev tools · 29d ago · gtmcofounder.com

OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.
Dev tools · 1d ago · opentrailpaper.com

Launched alongside, July 2022
the whole month →
- PO
Life & fun · 2022 · justine.lol
- PO
Dev tools · 2022 · github.com

- PP
Hello, HN - I wanted to share this puzzle game I made during my vacation. I'm rather fond of the pipes puzzle where your goal is to restore a scrambled network of connections by rotating tiles. It's usually played on a grid of squares and this all started when I decided to make a programmatic solver for that kind of puzzle. Then I realized that with some minor changes the solver could generate new puzzle instances. I thought about what kind of puzzle to make and someone suggested a hexagonal grid. Adapting the generator wasn't too hard but then I had to create a way to play this variant. So…
Life & fun · 2022 · hexapipes.vercel.app
- PD
We're building Parsnip to create a "tech tree" of cooking skills that allows anyone to level up on the building blocks of cooking knowledge while tracking their progress over time. It took us a few iterations to figure out the right product; here's the story of our latest pivot: [https://parsnip.substack.com/p/a-new-hope] The goal is to create a personalized way to learn any recipe on the Internet, then use this as a springboard to help home cooks of all levels solve the problem of repeated meal planning in a 10x better way:…
Work · 2022 · parsnip.ai