Simon Willison’s Weblog

Subscribe

Items tagged python, jamesbennett

Filters: python × jamesbennett × Sorted by date


Several libraries let you declare objects with type-hinted members and automatically derive validation rules and serialization/deserialization from the type hints – Pydantic is the most popular, but alternatives like msgspec are out there too. There’s also a whole new generation of web frameworks like FastAPI and Starlite which use type hints at runtime to do not just input validation and serialization/deserialization but also things like dependency injection.

Personally, I’ve seen more significant gains in productivity from those runtime usages of Python’s type hints than from any static ahead-of-time type checking, which mostly is only useful to me as documentation.

James Bennett # 7th April 2023, 2:19 am

Boring Python: code quality. James Bennett provides an opinionated guide to setting up Python tools for linting, code formatting and and other code quality concerns. Of particular interest to me is his section on packaging checks, which introduces a whole bunch of new-to-me tools that can help avoid accidentally shipping broken packages to PyPI. # 20th December 2022, 7:55 pm

History of Django’s popularity. “What sequence of events made Django the most popular Python web framework?”—insightful answers from Alex Martelli and James Bennett. # 4th October 2009, 10:29 am

On packaging. James Bennett discusses the problems with setuptools (and ruby gems), and recommends Ian Bicking’s pip as a setuptools replacement. # 14th December 2008, 4:57 pm

The future of web standards. Nice analysis from James Bennett, who suggests that successful open source projects (Linux, Python, Perl etc) could be used as the model for a more effective standards process, and points out that Ian Hickson is something of a BDFL for the WHAT-WG. # 17th December 2007, 1:16 pm

Updates to template_utils. James Bennett’s Django template_utils library now provides tags for consuming external RSS and Atom feeds. Combine with template fragment caching for an instant mashup written just using templates. # 10th December 2007, 3:25 pm

Newforms, part 1. James Bennett provides a detailed description of Django’s newforms (not so new now though, they’ve been around for over a year), complete with attractive diagrams. # 23rd November 2007, 11:54 pm

Django documentation bookmarklets. James Bennett continues his month-long series of daily Django tutorials with documentation for one of Django’s best kept secrets: application introspection HTTP headers and bookmarklets that make use of them. # 8th November 2007, 10:59 am

Django snippets. James Bennett’s new site for Django snippets. The source code to the whole site is available. # 26th February 2007, 10:08 am

mimeparse.py (via) Parsing mime-types is harder than you might think. # 8th January 2007, 6:43 pm