π‘ Python radar - December 2024
A personal selection of Python-related news and projects that caught my attention this month (note: leading emojis are mine).
βοΈ google/python-fire: automatically generate CLIs from any Python object (github.com)
This tool allows you to automatically create a command line interface (with arguments, options, help, etc.) from a simple Python object, minimalistic and practical.
πΌοΈ pyvista/pyvista: streamlined interface for the Visualization Toolkit (VTK) (github.com)
Hereβs a Pythonic interface to the famous scientific visualization library VTK that relies on Numpy to manipulate datasets and integrates well with Jupyter to quickly create beautiful interactive displays, not necessarily new but it popped up on my radar.
πΉοΈ kitao/pyxel: A retro game engine for Python (github.com)
Okay, this one may not be very relevant in a professional context, but Iβm throwing it here for the nostalgic ones π
π Advanced Python Development Workflow in Emacs (blog.serghei.pl)
A very detailed article on how to set up a complete Python development environment in Emacs
π¦ uv: An In-Depth Guide to Python's Fast and Ambitious New Package Manager (saaspegasus.com)
And yet another article about uv, but I recommend reading this one which clearly describes two types of development workflows with uv: one thatβs closer to the classic workflow (uv venv, uv pip install, etc.), and a simpler native uv workflow (uv sync, uv add, uv run) that masks some complexities.
π I trained myself to run farther using the Strava API and an IOT dog food bowl full of M&Ms (mayer.cool)
I really enjoy these DIY posts that are a bit geeky and quirky, showing how Python can be used at home for various serious or less serious things π€
π¬ Building a Chat Backend for Wikipedia Articles in Django (lincolnloop.com)
For those who know Django, I found this tutorial relatively simple to set up; it could spark some ideas.
π€ pydantic/pydantic-ai: Agent Framework / shim to use Pydantic with LLMs (github.com)
In this frenzy of new projects around LLMs, this "Agent Framework" seems to base itself on the ecosystem and resources around Pydantic, aiming to make it as simple and accessible as FastAPI; something to follow.
π₯ PyData NYC 2024 (youtube.com)
All the talks in video from the PyData NYC conference; thereβs visual, data processing, LLM (of course), more classic ML, something for everyone!
π Testing some tidbits (nedbatchelder.com)
How to check if a string contains only "0"s or "1"s? Here are about twenty ways to do that π΅ with timings in the first comment.
π Disposable environments for ad-hoc analyses (ericmjl.github.io)
This articleβs main merit is to mention the tool juv, which relies on uv and adopts its principles but adapted for Jupyter notebooks; for example, take your notebook.ipynb, add dependencies in "inline" format (that's new, see PEP-723) in the first cell, then juv run notebook.ipynb and boom juv/uv handles the venv, packages and launches Jupyter all by itself, nice.
π Major Releases of Plotly and Dash: Narwhals, Dash Hooks, and More (plotly.com)
The Plotly company announces major releases for Plotly.py (v6) and Dash (v3) among others, including the use of the abstraction layer Narwhals to allow the use of different dataframe libs, better performance, and a hook system for Dash, interesting!
π§© Single-file Django Apps with nanodjango (lincolnloop.com)
Django complicated? Definitely; but with this project, you can get started very simply with a single Python module like for FastAPI or Flask while benefiting from "batteries included" (model, admin), then when you're ready, convert your module into a real Django project; this venerable Django, which will celebrate its 20th anniversary this year, still seems to be very present and active!
π microsoft/markitdown: Python tool for converting files and office documents to Markdown (github.com)
A small open-source project from Microsoft for converting different types of documents and files to Markdown, mainly a wrapper that aggregates various existing tools, to be tested.
π Topological sort (rednafi.com)
If you have ever had to manipulate DAGs (directed acyclic graphs) in your code based on dictionaries, you may have wondered about topological sorting, and well, Python comes with a standard package named graphlib that does the job! This article then moves on to a version in Go for those interested.
β‘ benfred/py-spy: Sampling profiler for Python programs (github.com)
Hereβs a non-intrusive Python code profiler! Notably, the command "py-spy top -- python your_app.py" gives you an equivalent of the "top" tool (for *nix users) that displays live profiling of your code, top π!
π Top Python libraries of 2024 (tryolabs.com)
Another Top! But this time it concerns a list of Python packages/projects that marked 2024, according to the authors' criteria of course, but it's quite informative (and obviously a significant place is given to Gen AI / LLM).