Technical
Python in the AI Era: What Actually Matters
Every Python tutorial teaches you loops, functions, and list comprehensions. None of them tell you which Python skills actually matter when AI writes most of your boilerplate code. Here is what I focus on in 2025, and what I tell every developer who asks.
The Skills That Still Matter
AI can write a for loop faster than you can type one. It cannot decide your data model or your API contract. Here are the Python skills that remain valuable when AI handles implementation:
- Data modeling (Pydantic, dataclasses, type hints): Defining the shape of your data is a design decision that AI cannot make for you
- API design (FastAPI, endpoint patterns, error handling): Choosing the right routes, status codes, and response formats requires business context
- Package management (pip, uv, virtual environments): Knowing which dependencies to add and which to avoid is judgment, not code
- Scripting (automation, file processing, batch operations): Python's stdlib lets you automate anything without installing a single package
What AI Changed
Before AI tools, I spent 40% of my time writing boilerplate code. Model definitions, CRUD endpoints, test scaffolding, import organization. Now that number is close to 5%. The time savings go to more valuable activities:
- Designing better API contracts that serve the frontend efficiently
- Writing more thorough tests that cover edge cases and error paths
- Reviewing AI-generated code for security issues and logic errors
- Thinking about the business problem instead of the syntax
# AI writes this in seconds:
from pydantic import BaseModel, Field
from typing import Optional
class PostCreate(BaseModel):
title: str
slug: Optional[str] = None
body: str
excerpt: Optional[str] = None
categories: list[str] = Field(default_factory=list)
status: str = 'draft'My job is to decide whether this model is right for the business requirement. Should slug be optional or required? What validation rules apply to categories? The typing itself is commoditized.
FastAPI as the Default
For new Python APIs, I default to FastAPI. Three reasons:
- Type hints become validation: Pydantic does the heavy lifting for request and response schemas
- Auto docs: OpenAPI spec generated from your code with zero configuration
- Async support: Built on Starlette, production-ready for concurrent workloads
Django is still excellent for admin-heavy applications where non-technical users need a web interface to manage data. But for APIs that serve a React or Next.js frontend, FastAPI wins on simplicity and developer experience.
The Scripting Superpower
Python's real superpower in 2025 is scripting. I write Python scripts daily to batch-create content via APIs, process and transform data files, automate deployment workflows, and seed databases for development. The key insight: use the standard library.
#!/usr/bin/env python3
# Batch create articles via API -- no pip install needed
import json
import urllib.request
data = json.dumps(payload).encode('utf-8')
req = urllib.request.Request(url, data=data, method='POST')No pip install needed. No virtual environment required. Just python3 script.py and it works on any machine with Python installed.
Learn to design good data models and APIs. Let AI handle the implementation details. Use Python's stdlib for scripting. That is the modern Python developer's toolkit.
Check the official Python documentation for standard library reference.
RELATED READING
The Consulting Shift I Am Making In Year Two
After a year of writing and building, my consulting practice is changing shape. Shorter engagements. Sharper outcomes.
ReadThe Frontend Shift: Shipping Less JavaScript In Year Two
A year ago I reached for Next.js for everything. This year I often reach for nothing.
ReadThe Serverless Lesson I Would Write On A Sticky Note
After a year of shipping serverless projects, one rule explains most of the wins and all of the losses.
Read