π‘ Python radar - February/March 2025
A personal selection of Python-related news and projects that caught my attention this month (note: leading emojis are mine).
π The Mutable Trap: Avoiding Unintended Side Effects In Python (pybit.es)
A good reminder on why mutable default parameters in function should be avoided/ In summary, don't do this: f(args=[])
βοΈ Using uv to build and install Python CLI apps (mathspp.com)
A nice and quick workflow to setup and install your own CLI app using uv
π§ The surprising way to save memory with BytesIO (pythonspeed.com)
TL;DR BytesIO getvalue() method does not copy the content as long as you just read from it, that's it !
π€ kdunee/intentguard: A Python library for verifying code properties using natural language assertions (github.com)
What's interesting with this project is that it embeds a small local LLM "fine-tuned from Llama-3.2-1B-Instruct" which runs locally usingΒ llamafile, just "pip-install-it". Disclaimer: I haven't tested it so I don't how good it is, but I like the idea.
π¦ How to Manage Python Projects With pyproject.toml (realpython.com)
A detailed article about the not-so-new standard configuration file pyrpoject.toml
that aims at replacing setup.py
and which is now widely supported by many developer tools.
π FastAPI Deconstructed: Anatomy of a Modern ASGI Framework (rafiqul.dev)
Interesting article to understand the different software layers on which FastAPI is built.
π Goldziher/kreuzberg: A text extraction library supporting PDFs, images, office documents and more (github.com)
A new open-source project to run OCR tasks on various formats using local and open processing libraries.
π | A year of uv: pros, cons, and should you migrate (bitecode.dev)
Another month, another uv article, but since it changed so much the development experience, that's okay ! so here it is, a take on whether you should migrate to using uvβspoiler alert, you probably should.
π§© Bytes Objects: Handling Binary Data in Python (realpython.com)
A complete course on binary objects fundamentals and how to manipulet them in python.
πΊοΈ A Map of Python (fi-le.net)
A interactive map of python packages on PyPI linked by their dependencies, neat.
π‘ Hereβs how I use LLMs to help me write code (simonwillison.net)
Instructive write up by prolific blogger Simon Willison giving tips and advices on how to best leverage LLMs to increase your coding productivity.
π·οΈ autoscrape-labs/pydoll: Pydoll is a library for automating chromium-based browsers without a WebDriver, offering realistic interactions (github.com)
The title is self-explanatory, similar to selenium without the need to install additional (big) webdrivers.
π Binary search as a bidirectional generator (mathspp.com)
Though it might not be the most interesting solution to solve such alogrithm, at least it illustrates pretty well some advanced usage of python generator concept.
π¨ Python Textual: Build Beautiful UIs in the Terminal (realpython.com)
As always, a very detailed course from Real Python to build nice and rich graphical user interfaces in the terminal using a powerful library.
π« The Boolean Trap (engineerscodex.com)
If you think you need a boolean flag in your function signature, take a look at this quick article first, you're welcome.
π TDAmeritrade/stumpy: STUMPY is a powerful and scalable Python library for modern time series analysis (github.com)
I am not very familiar with time series but it advertises itself as a performant way to find patterns, detect anomaly, apply segmentation, etc. And the home page animation speaks for itself. Looks cool.
π Reinventing notebooks as reusable Python programs (marimo.io)
We already had a news here when Marimo came out, this recent article explains all the niceties and innovations this notebook project came up with, mainly due to using plain python scripts instead of JSON files.
π suitenumerique/docs: A collaborative note taking, wiki and documentation platform that scales. Built with Django and React. Opensource alternative to Notion or Outline (github.com)
A joint effort between french and german government digital agencies to build and offer to the world this feature-rich open source collaborative documentation platform, similar Notion, built partly in python (django), bravo!