Adam Johnson's Avatar

Adam Johnson

@adamj.eu

🐴 @djangoproject.com blogger and contributor ✍️ Author of three books on Django and Git πŸ• Django London co-organizer πŸ‡¬πŸ‡§ London / πŸ‡΅πŸ‡Ή Lisbon

3,315
Followers
264
Following
732
Posts
15.10.2023
Joined
Posts Following

Latest posts by Adam Johnson @adamj.eu

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

04.03.2026 12:57 πŸ‘ 8 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Thanks, and wow, that is not good!

25.02.2026 22:25 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

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

21.02.2026 13:20 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

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

21.02.2026 12:06 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

You only live 1+ times

21.02.2026 06:35 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Camberwell done mate

20.02.2026 20:30 πŸ‘ 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.

20.02.2026 20:25 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
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...

12.02.2026 15:00 πŸ‘ 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.

09.02.2026 12:13 πŸ‘ 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

09.02.2026 12:13 πŸ‘ 3 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Bonne voyage!

04.02.2026 08:54 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

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

03.02.2026 21:14 πŸ‘ 17 πŸ” 1 πŸ’¬ 0 πŸ“Œ 0

boiled, pan-fried, and grilled

01.02.2026 20:57 πŸ‘ 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

29.01.2026 23:50 πŸ‘ 11 πŸ” 1 πŸ’¬ 0 πŸ“Œ 0

Yay, they covered tprof! 🎯

27.01.2026 21:48 πŸ‘ 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

22.01.2026 08:49 πŸ‘ 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

15.01.2026 00:14 πŸ‘ 8 πŸ” 2 πŸ’¬ 1 πŸ“Œ 0

You got this!! πŸ’ͺ

14.01.2026 11:29 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

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

12.01.2026 22:33 πŸ‘ 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

12.01.2026 20:52 πŸ‘ 5 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Oxford spelling! Confuse everyone! en.wikipedia.org/wiki/Oxford_...

10.01.2026 19:50 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
Django Quiz 2025 - Adam Johnson Last month, I held another quiz at the December edition of Django London. The December quiz is an annual tradition at our meetup, a way of making this final event of the year more relaxed and giving a...

✍️ New post with last month’s quiz from Django London!

Test your Django knowledge with these 12 questions, or just skim the answers and learn something new.

adamj.eu/tech/2026/01...

#Django

03.01.2026 23:57 πŸ‘ 6 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Production Twitter on One Machine? 100Gbps NICs and NVMe are fast - Tristan Hume

Thinking again about this 2023 post that sketches out how Twitter could feasibly run on a single big-ass server

thume.ca/2023/01/02/o...

03.01.2026 00:01 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Zero todos is death.

02.01.2026 22:55 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
How I set up an automatic weekly blog digest How I set up an automatic weekly blog digest

I followed this post long ago and haven't touched it since: jvns.ca/blog/2017/12...

I'd probably use another service these days, like Buttondown, or rolling my own with AWS SES or whatever. Haven't researched the space in a while.

02.01.2026 22:47 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Blog! Blog! Blog!

02.01.2026 05:11 πŸ‘ 5 πŸ” 1 πŸ’¬ 0 πŸ“Œ 0
Styles of pizza we serve at Japes - Japes

For banging pizza in London go to Japes and get β€œLondon style”

japes.uk/styles-of-pi...

#London #Pizza

30.12.2025 11:45 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Login β€’ Instagram Welcome back to Instagram. Sign in to check out what your friends, family & interests have been capturing & sharing around the world.

My wife recommended checking out this account, maybe you’ve seen her

www.instagram.com/drchelsey_pa...

26.12.2025 19:59 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Sending Christmas love, man β€οΈπŸ’š

26.12.2025 14:38 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
Optimize `ObjectId` by adamchainz Β· Pull Request #2656 Β· mongodb/mongo-python-driver Changes in this PR From profiles of a mongoengine-using project, I’ve noticed that ObjectId creation happens a lot, around ~0.5% of total request time. This PR optimizes the class in two ways: It...

πŸ“ I just used @anthonypjshaw.bsky.social 's sweet-as richbench project for the first time, to validate a small optimization. Will definitely be using it again in the future!

github.com/mongodb/mong...

18.12.2025 00:07 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0