Advertisement · 728 × 90

Posts by Adam Johnson

Preview
Python: introducing profiling-explorer - Adam Johnson I’ve made another package! Like icu4py, which I made in February, it was sponsored by my client Rippling. And like tprof, which I made in January, it’s a profiling tool!

✍️ 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

2 weeks ago 5 0 0 0
prek - prek Better `pre-commit` alternative, re-engineered in Rust

Glad to help!

The cool kids seem to be trying out prek now, though… prek.j178.dev I've yet to dip my toes.

2 weeks ago 1 0 0 0
Running IPython today gives you the tip "Happy International Transgender Day of Visibility! You are valid. You matter."

Running IPython today gives you the tip "Happy International Transgender Day of Visibility! You are valid. You matter."

Nice IPython Easter Egg! 🏳️‍⚧️

#TransDayOfVisibility #Python

2 weeks ago 5 0 0 0
deptry A command line utility to check for unused, missing and transitive dependencies in a Python project.

I've just done a pass over a client project with deptry, and it worked great for finding unused dependencies!

deptry.com

#Python

3 weeks ago 7 0 0 0

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.

3 weeks ago 1973 668 51 24
Preview
Docs: `import datetime as dt` in examples (#145315) · python/cpython@d3b6faf

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

3 weeks ago 10 2 0 1

I was somewhat hopeful for pyx and maybe a CI service. Ah well…

4 weeks ago 1 0 0 0

Genius!

4 weeks ago 0 0 0 0
Advertisement

Excite!

1 month ago 1 1 0 0
Preview
Chekhov's Gun - TV Tropes Russian writer Anton Chekhov, master of the short story, gave this advice: If it's not essential, leave it out of the narrative. The term has come to mean any object that later turns out to be importa...

Enjoy reasing this wiki that names many such storytelling tropes tvtropes.org/pmwiki/pmwik...

1 month ago 1 0 0 0
Preview
PEP 827 – Type Manipulation | peps.python.org We propose adding powerful type-level introspection and construction facilities to Python’s type system. This design is inspired largely by TypeScript’s conditional and mapped types, but is adapted to...

Very interesting PEP that could unlock a clear way to type Django’s ORM

peps.python.org/pep-0827/

#Django #Python

1 month ago 8 0 0 0

Thanks, and wow, that is not good!

1 month ago 0 0 0 0

“The awful biomass” - have you got any deeper link on *how* bad it is?

1 month ago 0 0 1 0

a kind of boner'd I never thought I'd be

1 month ago 2 0 0 0

You only live 1+ times

1 month ago 2 0 1 0

Camberwell done mate

1 month ago 1 0 0 0

Nice, I always like a good cleanup. I use daisydisk, somehow a pie chart helps my brain more than rectangular areas.

1 month ago 0 0 0 0
Advertisement
Preview
Django: profile memory usage with Memray - Adam Johnson

[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...

2 months ago 1 1 0 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.

2 months ago 1 0 0 0
Preview
Python: introducing icu4py, bindings to the Unicode ICU library - Adam Johnson I made a new package! Thank you to my client Rippling for inspiring and sponsoring its development.

✍️ 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

2 months ago 3 0 1 0

Bonne voyage!

2 months ago 1 0 0 0

Yay, my packages django-htmx and django-rich are now receiving income through Tidelift. Thanks, Tidelift and its subscribers! 🚀

2 months ago 17 1 0 0

boiled, pan-fried, and grilled

2 months ago 0 0 0 0
Preview
Django: profile memory usage with Memray - Adam Johnson Memory usage can be hard to keep under control in Python projects. The language doesn’t make it explicit where memory is allocated, module imports can have signficant costs, and it’s all too easy to c...

✍️ 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

2 months ago 11 1 0 0
Advertisement

Yay, they covered tprof! 🎯

2 months ago 5 0 1 0
A carton of four “Giga” apples (tagline: “mighty good”)

A carton of four “Giga” apples (tagline: “mighty good”)

A packet of ~60 giga bites

2 months ago 3 0 0 0
Preview
Python: introducing tprof, a targeting profiler - Adam Johnson Profilers measure the performance of a whole program to identify where most of the time is spent. But once you’ve found a target function, re-profiling the whole program to see if your changes helped ...

✍️ 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

3 months ago 8 2 1 0

You got this!! 💪

3 months ago 2 0 0 0

There’s probably a bunch of low-hanging fruit sitting around on various code paths like this…

3 months ago 0 0 1 0
Preview
Fixed #36858 -- Optimized `Field._get_default()` for `db_default` case. by adamchainz · Pull Request #20526 · django/django Trac ticket number ticket-36858 Branch description Create and share a single instance of DatabaseDefault instead of making a new one each time the lambda is called. The quick benchmark on the ticke...

Made a nice optimization for Model.objects.bulk_create() with fields using db_default, ~12% in one quick benchmark:

github.com/django/djang...

#Django

3 months ago 5 0 1 0