Pricing products using Python graphs and sets
summary
A model-driven pricing engine that represents items and rules as a product graph consumes XML/DB exports, matches a small set of supported patterns (includes, requires, max occurrences) via behavior tests written with freshen/BDD pattern tests, and returns charges as JSON over HTTP. It uses adjacency lookups and a Rete-like approach so only relevant rules run, handles odd cases (three-scoop tubs vs cones, a €7 oversized cone), and is production-ready with fast iteration and cached results for performance.
AI-written summary · about
chapters (14)
- 0:00Intro
- 6:50Cucumber
- 8:25Scenarios
- 11:48Introducing David
- 12:41Davids background
- 13:38Typical workflow
- 15:49How to express rules
- 17:58Examples of bad rules
- 20:07Why you should build a better Python
- 21:11The alternative
- 22:59The bad way
- 25:46Product lifecycle management
- 28:53How to interpret rules
- 35:39Summary
related talks
28mProductionize Research Oriented Code By Python
15mBeating the averages at JustDial with Julia
33mElegant Solutions For Everyday Python Problems
01h 51mData Visualization and Exploration with Python
31mBuilding Data-Driven Client Relationship Management in Banking with Python
30mIntroducing Labrea: How Embracing Declarative Functional Programming Can Lead You Out of the Tar Pit
44mPython for Economists: An overview of Python tools for Economists
02h 46mThe How and Why of Object-oriented Programming in Python
