Python: Weekly Summary (June 30 - July 06, 2025)
Key trends, opinions and insights from personal blogs
Prototyping with LLMs
So, let's dive into the world of prototyping with large language models, or LLMs, as Adam Keys shares his journey. It's like he's on a mission to build something cool using these models, and he's got his trusty M3 MacBook Pro by his side. Adam's been tinkering with models like Qwen3 and Mistral, and he's all about creating tools to make job searching a breeze. Imagine having a tool that matches job descriptions and even helps you whip up cover letter ideas. That's what Adam's aiming for, and he's learning Python and other techy stuff along the way. It's like he's on a tech adventure, and he's inviting us to join him.
Adam's approach is all about using templates and fragments for problem-solving. It's like having a recipe book for coding, where you mix and match ingredients to create something new. And he's not just stopping at building tools; he's also diving into the world of Claude Code. It's like he's got a toolbox full of gadgets, and he's figuring out how to use each one to its fullest potential. If you're curious about how LLMs can be used for prototyping, Adam's journey is definitely worth a read.
Transport Summary Q2 2025
Now, let's switch gears and talk about transportation tracking with Jeremy Cherfas. Jeremy's been keeping tabs on his bicycle rides, and it's like he's on a quest to understand his own travel patterns. In Q1, he clocked 11 rides, and in Q2, he upped his game to 14. But it's not just about the numbers; it's about the challenges of tracking these trips accurately.
Jeremy's been using Python scripts to keep track of his rides, but it's not always smooth sailing. It's like trying to keep a diary, but sometimes you forget to jot things down. He emphasizes the importance of correcting mistakes promptly, which is a lesson we can all relate to. It's like when you spill coffee on your shirt, and you need to clean it up before it stains. Jeremy's journey is a reminder that even in the world of data, mindfulness is key.
awwaiid/gremllm
Next up, we've got a quirky little library called Gremllm, introduced by Simon Willison. It's like a magic wand for Python, where you can generate method implementations just by naming them. But Simon gives us a cheeky warning: maybe don't rely on it too much. It's like having a mischievous genie that grants your wishes but with a twist.
Gremllm lets you define a class and interact with it in a unique way, but Simon's humor shines through as he suggests it might lead to unexpected results. It's like playing with a jack-in-the-box; you never know what's going to pop out. If you're curious about this playful library, Simon's post is a fun read.
Software Engineering for Data Scientists
Now, let's get into the nitty-gritty of software engineering with Han Lee. Han's got some strong opinions about Pydantic, a tool that's often used in Python for data validation. It's like he's on a mission to set the record straight about how it should be used.
Han talks about two major anti-patterns: 'serdes debt' and 'inheritance over composition'. It's like he's pointing out the potholes on the road to good coding practices. He argues that Pydantic should be used primarily at service boundaries, not throughout the codebase. It's like using a hammer only when you need to drive a nail, not for every little task.
Han even provides benchmarks comparing Pydantic with Python dataclasses, showing that dataclasses are faster and more memory-efficient. It's like he's got the stats to back up his claims, and he's not afraid to share them. If you're a data scientist or just curious about Python best practices, Han's insights are worth exploring.
Using cog for Pinned Single-File Python Scripts
Last but not least, let's talk about the magic of single-file Python scripts with Josh Cannon. Josh introduces us to 'cog', a content generation tool that lets you embed Python code in static files. It's like having a Swiss Army knife for coding, where you can manage dependencies and generate documentation all in one place.
Josh highlights the beauty of cog's functionality, especially when it comes to generating documentation and managing dependencies within a single file. It's like having a tidy little package where everything you need is neatly organized. But he also addresses the limitations of single-file scripts, like dealing with transitive dependencies.
To tackle these challenges, Josh proposes a solution using cog to generate and pin dependencies, along with a self-relocking feature for updating them. It's like having a lock that automatically adjusts to fit the key. If you're into Python scripting and want to streamline your workflow, Josh's post is a treasure trove of tips.
So, there you have it, a whirlwind tour of Python adventures from prototyping with LLMs to mastering single-file scripts. Each author brings their own flavor to the table, and there's plenty more to explore in their posts. Whether you're a seasoned coder or just dipping your toes into the Python pool, these insights are sure to spark your curiosity.