The default that came back
uv, the tool a growing share of new Python projects now start with, has changed what its setup command leaves in the folder: a package you can build and publish, instead of one starter file.
Run uv's setup command last week and you got a single starter file sitting in an otherwise empty directory. Run it in version 0.12.0, out this week, and you get a folder called src with your code inside it, a named command other people can type, and a recipe for turning the whole thing into an installable package. One more command builds it.
"I've so far avoided using src layout in my own projects just out of inertia. I think it's time I switched." — Simon Willison
uv shipped this exact default once before and then deleted it. An early version scaffolded packaged projects; the next release cut it back to the lone file, because the config it generated named hatchling, a third-party build tool beginners had never heard of and were suddenly expected to trust. Nothing about the layout's merits changed in the interval. What changed is that Astral went and wrote its own build backend, so the line in the generated file now names Astral's tool rather than a stranger's, and the recommendation returned the moment it stopped being awkward to make.
The extra folder earns its place by putting your code out of casual reach: tests have to import the built package rather than the loose files lying beside them, so you discover you forgot to ship something before your users do. Python's packaging group has advised this for years and it has stayed a minority habit, because the whole cost lands on day one, when a new project is the last thing you want to think carefully about. Anyone who wants the flat folder back types uv init with a no-package flag and gets it. Everyone who types nothing now gets the layout the ecosystem has spent a decade recommending and failing to spread.
Run uv init on a throwaway name and look at what lands in the folder; the release notes list the other breaking changes in 0.12.0 before you let a build pipeline upgrade itself.
Get the tool at github.com →The lenses
The facts
Concepts
How this connects
Tap a node to open it