Real Python (@realpython) header
Real Python (@realpython) profile picture

Helping Python developers build with AI: apps, agents, models, and AI-assisted coding. Expert-reviewed tutorials and courses, read by 1M+ developers a month.

Joined August 2012
Photo by Real Python (@realpython)Photo by Real Python (@realpython)Photo by Real Python (@realpython)Photo by Real Python (@realpython)Photo by Real Python (@realpython)Photo by Real Python (@realpython)Photo by Real Python (@realpython)Photo by Real Python (@realpython)Photo by Real Python (@realpython)Photo by Real Python (@realpython)
Lost for a second in a Real Python video course? Ask Mentor AI, the AI study companion, what the instructor just said. Follow up on side questions. Quiz yourself before the next lesson. realpython.com/mentor/?utm_s…
2
9
3,044
Want to work with data but no idea where to start? There's an order to it: load a dataset → clean it → group it → chart it → find what it's telling you. This path walks you through each step once you know basic Python. realpython.com/learning-path…
1
2
518
x = 1 is the easy case. Parameters, loop variables, with ... as f, except ... as e, the walrus operator and match patterns all bind names too. To dim unused names, the ty type checker handles each case on its own. Where the reads hide is the hard part. realpython.com/podcasts/rpp/…
598
Real Python retweeted
These are exciting weeks at @realpython. We have amazing news to share tomorrow!
1
3
397
requirements.txt was never a standard. pip's docs call it a list of things pip installs. PEP 751 adds a real one, pylock.toml: 1. 2 packages in, 5 locked 2. What it pins besides versions 3. One file for pip, uv, pdm 4. Where support lags 5. When to keep requirements.txt 🧵
5
1
2
10
2,761
5. requirements.txt still wins when you need pip options like --index-url in the file, or for a quick script with two dependencies you typed by hand. When teammates use pip, uv and pdm, or CI should install exact files without resolving anything, use pylock.toml.
1
1
380
"How much has Kevin spent with us?" Your agent calls a Python tool → gets 160 → answers in plain words. Want to build that? Real Python has a guided path from your first LLM API call to agents with MCP tools. Free learning plan here: realpython.com/start/ai-apps…
6
1,088
Can't keep Claude Code's slash commands, flags, hooks and subagents straight? The free cheat sheet puts them all on two printable pages. Keep it next to your keyboard. realpython.com/bonus/claude-…
1
5
1,554
Django 6.0 ships a task framework, django.tasks. Out of the box, it never runs a task in the background. Before you ship it: 1. Backends you can't deploy 2. Arguments that crash .enqueue() 3. Tasks that beat a commit 4. Results that go stale 5. Emails stuck behind reports 🧵
2
6
2,751
5. By default, every task lands in a queue called default, so a welcome email can sit behind a half-hour report. Use @task(queue_name="emails"), list "emails" in the backend's QUEUES setting, and run one worker per queue. Priority (-100 to 100) orders tasks within a queue.
1
1
365