Event Sourcing Design Pattern - Talk Python to Me Ep. 548
What if your database worked more like Git? Every change captured as an immutable event you can replay, instead of a single mutating row that quietly forgets its own history. That's event sourcing, and Chris May is back on Talk Python, fresh off our Datastar panel, to walk us through what it actually looks like in Python. We'll cover the core patterns, the libraries to reach for, when not to use it, and why event sourcing turns out to be a surprisingly good fit for AI-assisted coding. ▬▬▬▬ About the podcast ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ This video is the uncut, live recording of the Talk Python To Me podcast ( https://talkpython.fm ). We cover Python-focused topics every week and publish the edited and polished version in audio form. Subscribe in your podcast player of choice (100% free) at https://talkpython.fm/subscribe. ▬▬▬▬ Guests ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Chris May ▬▬▬▬ Links and resources from the show ▬▬▬▬▬▬▬▬▬▬▬▬ Intro to event sourcing e-book: https://everydaysuperpowers.gumroad.com/l/es_intro Domain-Driven Design: The Power of CQRS and Event Sourcing: How CQRS/ES Redefine Building Scalable System: https://ricofritzsche.me/cqrs-event-sourcing-projections/ DDD: https://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215 Understanding Eventsourcing (Martin Dilger): https://www.amazon.com/Understanding-Eventsourcing-Planning-Implementing-Eventmodeling/dp/B0DNXQJM9Z/ref=sr_1_1?dib=eyJ2IjoiMSJ9.LqdaOIXJSPbgGuz_Akil-snFyMZVys1Y2IhnqvPv_CGK3R6Vwvu6AN1PHBi6twz-c3bPG5mdbhLJQyYs30LXh2pT6wiqXPrz0RKmfeYzq_sT18tc2UAWVG8rFBN1C-H46AHiiDqusp6SyDm2W15n4ZBKn11xW4yNvazjq3pg369c53KDFONnWqe9AB4xzAF2VeQ4n64hOk30-GmG_1K6_zIPBw4PXkVX9UDYq0QDIAQ.0Kvsl2V8aqDO4Av47g881GGoRPCpF0gCrbF6GJZbjRE&dib_tag=se&keywords=understanding+event+sourcing&qid=1777078561&sbo=RZvfv%2F%2FHxDF%2BO5021pAnSA%3D%3D&sr=8-1 Event Sourcing Explained using Football Video: https://www.youtube.com/watch?v=xPmQxYIi5fA Why I finally embraced event sourcing and why you should too article: https://everydaysuperpowers.dev/articles/why-i-finally-embraced-event-sourcingand-why-you-should-too/ valkey: https://valkey.io/ diskcache: https://talkpython.fm/episodes/show/534/diskcache-your-secret-python-perf-weapon eventsourcing package: https://github.com/pyeventsourcing/eventsourcing eventsourcing docs: https://eventsourcing.readthedocs.io/en/stable/topics/tutorial/part1.html John Bywater: https://github.com/johnbywater Datastar: https://data-star.dev/ Microconf: https://microconf.com/ Event Modeling & Event Sourcing Podcast: https://podcast.eventmodeling.org Python Package Guides for AI Agents: https://github.com/mikeckennedy/python-package-guides-for-agents Iodine tablets AI joke: https://x.com/pr0grammerhum0r/status/2046650199930458334?s=46&featured_on=pythonbytes KurrentDb: https://www.kurrent.io ▬▬▬▬ Dive deeper ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Listen to the Talk Python To Me podcast at https://talkpython.fm and explore over 275 hours of Python courses at https://training.talkpython.fm/courses. ▬▬▬▬ Follow us on Social ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Mastodon: Michael - https://fosstodon.org/@mkennedy & Talk Python - https://fosstodon.org/@talkpython Bluesky: Michael - https://bsky.app/profile/mkennedy.codes & Talk Python - https://bsky.app/profile/talkpython.fm X: Michael - https://x.com/mkennedy & Talk Python - https://x.com/talkpython