✍️ New post introducing profiling-explorer, a tool for exploring Python profiling data (pstats files).
Use it with the classic cProfile (now called profiling.tracing) or Python 3.15’s new sampling profiler, Tachyon (profiling.sampling).
adamj.eu/tech/2026/04...
#Python
Posts by Adam Johnson
Glad to help!
The cool kids seem to be trying out prek now, though… prek.j178.dev I've yet to dip my toes.
Running IPython today gives you the tip "Happy International Transgender Day of Visibility! You are valid. You matter."
Nice IPython Easter Egg! 🏳️⚧️
#TransDayOfVisibility #Python
I've just done a pass over a client project with deptry, and it worked great for finding unused dependencies!
deptry.com
#Python
A billionaire can get what they want with one donation to a political party. The rest of us must fight for years to get even the most basic rights recognised. Money destroys democracy, more than any other cause. The first step towards a better world is to stop the rich buying political outcomes.
Wow, thanks @hugovk.dev for making my "import datetime as dt" recommendation official in the Python docs, with a link to my blog!
github.com/python/cpyth...
#Python
I was somewhat hopeful for pyx and maybe a CI service. Ah well…
Genius!
Excite!
Very interesting PEP that could unlock a clear way to type Django’s ORM
peps.python.org/pep-0827/
#Django #Python
Thanks, and wow, that is not good!
“The awful biomass” - have you got any deeper link on *how* bad it is?
a kind of boner'd I never thought I'd be
You only live 1+ times
Camberwell done mate
Nice, I always like a good cleanup. I use daisydisk, somehow a pie chart helps my brain more than rectangular areas.
[Articles] Django: profile memory usage with Memray
Use Memray to profile Django startup, identify heavy imports like numpy, and reduce memory by deferring, lazy importing, or replacing dependencies. #djangonews
adamj.eu/tech/2026/0...
Use this package to split text into characters/words/sentences/lines, or to flexibly translate strings around complex pluralization rules.
The post includes some musings on my “agentic engineering” approach to building the package.
✍️ New post introducing icu4py: Python bindings to ICU (International Components for Unicode), the official translation and localization library from Unicode.
adamj.eu/tech/2026/02...
#Python #AI #i18n #l10n
Bonne voyage!
Yay, my packages django-htmx and django-rich are now receiving income through Tidelift. Thanks, Tidelift and its subscribers! 🚀
boiled, pan-fried, and grilled
✍️ New post on using Memray to profile the memory usage of a Django project.
You can use this tool to find and eliminate memory-costly lines of code. The example in the post finds and removes a costly import, reducing startup time.
adamj.eu/tech/2026/01...
#Django #Python
Yay, they covered tprof! 🎯
A carton of four “Giga” apples (tagline: “mighty good”)
A packet of ~60 giga bites
✍️ New post introducing tprof, a new targeting profiler for Python 3.12+ that measures only specified functions.
Use tprof to measure the impact of a few functions without adding overhead to the whole program.
adamj.eu/tech/2026/01...
#Python
You got this!! 💪
There’s probably a bunch of low-hanging fruit sitting around on various code paths like this…
Made a nice optimization for Model.objects.bulk_create() with fields using db_default, ~12% in one quick benchmark:
github.com/django/djang...
#Django