Stop Overwriting State And Use Event Sourcing Instead
→ Try Flox for free: https://flox.dev/?utm_source=youtube&utm_medium=social&utm_campaign=Arjan&utm_content=homepage In this video, I explore how to build an inventory system using the event sourcing pattern in Python, step by step. You’ll learn what event sourcing is, why it’s useful, and how it lets you track every change over time instead of just storing the final state. We’ll start with a basic implementation using string events, add caching for performance, then evolve the system with structured Item objects and projections to analyze the data. Plus, we’ll look at real-world parallels like Git and blockchain, and discuss when (and when not) to use this pattern in your own projects. Design pattern playlist: https://www.youtube.com/playlist?list=PLC0nd42SBTaNf0bVJVd9e2oBV-mcUuxS0 💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide. 🔥 GitHub Repository: https://git.arjan.codes/2025/event. 🎓 ArjanCodes Courses: https://www.arjancodes.com/courses. 💬 Join my
Watch on ArjanCodes
Opens in a new tab




