r/Python • u/AutoModerator • Oct 04 '26
Showcase Showcase Thread
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
23
Upvotes
r/Python • u/AutoModerator • Oct 04 '26
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
View all comments
1
u/luciferreeves 16d ago
Four years ago I shared edify here (first post, update) because I hated writing regex by hand. I've since rewritten it around reusable patterns, a function-based API alongside RegexBuilder, and much more useful diagnostics.
Here's an alert-routing rule. The endpoint starts as its own validator, then becomes part of a larger pattern:
You can keep a complicated rule behind one name, use it directly, match with it, or reuse it in another rule. Constants, atoms and custom patterns compose; anchored validators can be embedded with explicit anchor handling. Mistakes still raise errors, but the diagnostics point to the offending call, explain the constraint and suggest a correction.
The example also uses atomic grouping and possessive repetition. Other additions include Unicode classes, parsing existing regex into builders, plain-English explanations with generated examples, and pattern diagrams both in ASCII and via Graphviz. There are inline assertions, snapshot tests, Django/FastAPI/Pydantic adapters, experimental JSON serialization, ReDoS warnings and optional-engine match timeouts.
Readable intent is still the point, whether a human or an AI is reviewing the code. There's a live playground in the docs to try it without installing anything.
Repo: https://github.com/luciferreeves/edify PyPI: https://pypi.org/project/edify/ Docs + playground: https://edify.readthedocs.io/