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
2,975
Codex CLI wired up the Delete and Clear All buttons in a Python contact book app, and both worked. Two of the five methods it added only called another method. This thread covers the /diff review that caught them and four more habits for keeping Codex CLI in check 🧵
1
1
446
The first time you run codex in a folder, it asks whether you trust the folder's contents. It asks because of prompt injection. Files someone else controls, like a repo you just cloned, can carry instructions that steer the agent.
1
105
Your LLM can't read all your company docs at once. Something has to pick the right ones first. That's what a vector database does. ChromaDB lets you store text as numbers and pull back the closest matches in Python. realpython.com/chromadb-vect…
2
7
744
In this tutorial's test, setting Meta's Muse Spark to "minimal" reasoning cut latency by more than half and cost by about 60%, with no loss in accuracy. Its API speaks the same protocol as OpenAI's, so a few lines of Python get you started. realpython.com/meta-muse-pyt…
5
1,088
Python 3.15 makes UTF-8 the default encoding. Your code must run on older versions too, Windows included. 5 checks for portable file I/O: 1. Mojibake with no error 2. Defaults beyond open() 3. A flag to find bare calls 4. A locale call that changed 5. A library author's fix 🧵
3
1
11
2,117
5. Writing a library function with an encoding=None parameter? Pass it through io.text_encoding() before you call open(). Then, when a user turns on EncodingWarning, it points at their call to your function, so they see which of their lines to fix.
1
1
338
Anthropic is pausing new frontier model releases, while coding tools keep moving: Cursor is now Grok Build, and GitHub rebuilt Copilot code review. Plus three new models to try 🧵
2
6
3,827
🛡️ Reflection's open-source Iris safety evals and safeguards An open safety benchmark plus two guardrails, Iris Cyber Probe and Iris Content Guard, for teams shipping open-weight models.
1
1
1
375