Win three years of Real Python, plus all four of our Python books.
That's our Black Friday giveaway. Entering is free, you just need a free Real Python account.
Entries close Friday, November 27.
realpython.com/blackfriday?u…
"If AI writes the code, juniors can skip the basics."
Employers disagree. They want both.
This free kit has videos, cheat sheets and quizzes for the fundamentals, plus ways to use AI as a mentor that explains and reviews your code.
realpython.com/kits/junior-d…
5
1,253
Your AI agent keeps guessing how your project works. So it guesses wrong.
Tests, a type checker, a linter and an AGENTS.md file give it answers instead of guesses.
Build that setup from an empty folder:
realpython.com/python-projec…
3
8
1,186
"I don't feel like I've scratched the surface of what I can do with Python."
You know the basics. Now it's libraries, frameworks and best practices.
This page lines up the tutorials and courses for that next step.
realpython.com/intermediate-…
1
7
1,268
What's the largest crew you've run before the token bill or the debugging got out of hand?
The tutorial builds a two-agent crew where one agent scrapes python.org.
realpython.com/crewai-python…
5. CrewAI agents don't chat with each other. They pass task outputs along, with no built-in way to negotiate or debate.
If your agents need to discuss and revise, Real Python's CrewAI tutorial points to AG2 or Microsoft Agent Framework. For conditional branching, LangGraph.
4. CrewAI tasks marked async_execution=True run in parallel. A writer task with context=[task_a, task_b] waits for both.
So the writer starts only when its slowest input finishes. If the writer can do without that input, drop it from context and the whole crew finishes sooner.
1
38
3. Each CrewAI agent makes its own LLM calls. Three agents in sequence means at least three calls, more if they use tools or iterate.
Check crew.usage_metrics after crew.kickoff() for token counts. Set an agent's function_calling_llm to run its tool calls on a cheaper model.
1
43
2. Your CrewAI crew runs on Gemini, and you still get an error about OPENAI_API_KEY?
If you turn on memory=True or use certain tools, CrewAI may look for that key anyway.
Setting OPENAI_API_KEY to any non-empty string makes the error go away.
1
1
72
1. CrewAI requires Python 3.10 to 3.13.
On Python 3.14 or later, pip install crewai doesn't stop you. It silently resolves to a much older CrewAI release, and that release then fails to build.
Run python --version before you install.
1
1
73
CrewAI lets you swap one overloaded LLM prompt for a crew of AI agents in Python. 5 things to know first:
1. Python 3.14 breaks the install
2. OpenAI key errors on Gemini
3. Where the token bill shows
4. One slow task delays the writer
5. When to use another framework
🧵
Lost the thread halfway through a video lesson?
Mentor AI sits next to Real Python's video courses. Ask what the instructor just said, chase a side question, then quiz yourself before the next lesson.
realpython.com/mentor/?utm_s…
4
1,369
Your app saves to CSV and JSON files that keep getting harder to query.
SQLite keeps it all in one file with no database server. SQLAlchemy lets you treat the rows as Python objects.
realpython.com/python-sqlite…
Where do you profile slow pandas code: Spyder, VS Code, Jupyter, or nowhere?
The tutorial also shows the setting that lets you rotate Spyder's 3D plots, plus a cheat sheet.
realpython.com/spyder-ide/?u…
5. Spyder is built for data science and scientific work in Python.
For a full software project, the Spyder tutorial points to VS Code. If you mix languages, Spyder won't fit.
It handles notebooks only through a plugin, so for heavy notebook use, try Jupyter or VS Code.
4. Click a DataFrame in Spyder's Variable Explorer and it opens as a table you can edit cell by cell.
After Save and Close, your edit lives in memory for this session only. The CSV file on disk doesn't change.
Fine for a quick what-if, as long as you know that.
1
21
3. Save a profiling run in Spyder, fix your code, profile again and load the saved run.
The Profiler shows the difference per function. For find_humidity_rows(), that was 62.18 ms off local time and 3.73 s off total.
You don't add any timing code to your script.
1
23
2. Spyder's Profiler shows two times per function. Local time is the function's own code. Total time adds everything it calls.
The iterrows() version: 62.23 ms local, 3.73 s total.
Read only the local column and you'd miss 3.67 of those 3.73 seconds.
1
1
62
1. The fix is a single line: return df.loc[df["Humidity"] >= target]
It returns the same rows without a Python loop. In Spyder's Profiler, total time dropped from 3.73 s to 905.33 µs.
If pandas has a built-in way to filter rows, use it before you write an iterrows() loop.
1
2
70
This pandas function loops with iterrows() to keep rows with humidity ≥ 0.90. The Spyder IDE's Profiler timed it at 3.73 s.
5 things to know:
1. The one-line fix: 905 µs
2. Why local time said 62 ms
3. Comparing runs
4. Edits your CSV never sees
5. When to skip Spyder
🧵

ALT Python code: a function find_humidity_rows(df, target) builds an empty list, loops over the DataFrame with df.iterrows(), appends each row whose Humidity is at least target, and turns the list into a new DataFrame. The iterrows loop, the append and the DataFrame call are highlighted in red. It's called on weather data read from data/weatherHistory.csv with a target of 0.90.
Your code runs, but the answer is wrong, and you can't see why.
Thonny is a free Python editor made for beginners. Its debugger walks through your code one step at a time.
realpython.com/python-thonny…
1
7
1,509

![Python code: the same find_humidity_rows(df, target) function, now one highlighted line that returns df.loc[df["Humidity"] >= target]. It's called on the same weather data with a target of 0.90.](https://pbs.twimg.com/media/HXvqC5fWQAACeSI.jpg?name=small&format=webp)