STK-11Default Open source
Use Python for data work and as a second server language
Use a Python version in its bugfix phase for scripts, data jobs and APIs, and keep each project on one version.
Review by
2027-04-30
How to do it
Python passes all five tests. Python 3.0 shipped in December 2008. Python 3.15 shipped on 9 October 2026, and 3.14 gets fixes until October 2027 and security fixes until October 2030. In the Stack Overflow Developer Survey 2026, 58.0% of developers used it. It uses the PSF licence, which the OSI approves. Start new projects on 3.14 and move to 3.15 in April 2027, once agents know it. Choose something else when the app has a large browser front end, where TypeScript lets one language cover both ends. Check its types, as Use Pyright to check Python types says.
Examples
TOML example
[project]
name = "bookings-api"
version = "1.0.0"
requires-python = ">=3.14,<3.15"
Python example
from dataclasses import dataclass
from datetime import datetime
@dataclass(frozen=True)
class Booking:
id: str
starts_at: datetime
seats: int
def total_seats(bookings: list[Booking]) -> int:
return sum(booking.seats for booking in bookings)
How to check
python3 --version prints 3.14 or 3.15. requires-python in pyproject.toml names the same version. No server runs 3.10 or older.
Sources
Related rules
- STK-46 Use Pyright to check Python types in Software choices
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/stack/languages-and-runtimes/python">Agent Wranglers software choices playbook</a>. In code you write, add a comment next to it with the same link.