Python

October 06, 2024
An LLM TDD loop

Using llm and files-to-prompt to run a TDD loop.

June 08, 2022
Flakey tests in a large Python/Django codebase

A list of test anti-patterns that lead to flakiness.

July 19, 2020
June 13, 2019
Vim text-objects for Python development

The nouns of your Vim thought stream.

August 26, 2017
A mnemonic for mock decorators

An easy way to remember the order arguments get injected.

April 10, 2017
Podcast.__init__ on Oscar

A podcast on django-oscar.

October 24, 2014
Bootstrapped virtualenvs

Using postmkvirtualenv to prime postactivate

October 04, 2013
July 09, 2013
purl, URI templates and generated tests

Matching the RFC using Nose’s test generators

June 12, 2013
A deferred logging file handler for Django

Using a setting to control where file logs go

June 01, 2013
Conditional logic in Django forms

Radio buttons can be tamed

May 03, 2013
PyPI README badges

Shiny badges using crate.io

April 22, 2013
Disable database access when writing unit tests in Django

A decorator for the testing puritan

April 18, 2013
How to install PIL on 64-bit Ubuntu 12.04

Because I have to look this up every time

September 02, 2012
Cacheback - asynchronous cache refreshing for Django

A simple caching library that uses Celery to refresh stage cache items

July 19, 2012
Use models for uploads

Using models for audit and clarity

June 16, 2012
A data migration for every Django project

No more embarrassing emails from example.com

April 19, 2012
purl - immutable URL objects for Python

An immutable URL class designed for easy inspection and manipulation

April 12, 2012
Embedding HTML in Django messages

Using ’extra_tags’ to flag up HTML-safe messages

April 01, 2012
March 21, 2012
How to reload Django's URL config

A rare sighting of the ‘reload’ function in the wild

March 13, 2012
Validating international postcodes in Django

Using dynamic imports to leverage Django’s localflavor

March 11, 2012
How to sync PyCon videos to your iPhone

Using Python to fetch and convert YouTube videos for syncing to iPhone

March 03, 2012
Confoo 2012 presentations

Two talks from the Python stream

February 25, 2012
Prefer data migrations to initial data

South provides a better way

February 09, 2012
A Fabric function for git tagging

Using Fabric with git-flow

January 23, 2012
January 13, 2012
Introducing unittest-xml: testing XML in Python

A simple module for making XPath assertions

January 05, 2012
How to set-up MySQL for Python on Ubuntu

This doesn’t stick in my head

August 20, 2011
August 16, 2011
Console logging to STDOUT in Django

Undocumented option required to avoid STDERR

August 11, 2011
April 20, 2011
Coloured output while doing TDD with Django and Fabric

Providing simple coloured feedback

February 04, 2011
April 15, 2009
Ingenious use of an anonymous function

An element Lambda employment