Python has something called wildcard imports, which look like from module import *. This type of import allows you to quickly get all the objects from a module into your namespace. However, using this import on a package can be confusing because it’s not clear what you want to import: subpackages, modules, objects? Python has the __all__ variable to work…
Real Python
https://realpython.com/blog/ · 106 posts · history since 2024 · active
Today
In this quiz, you’ll test your understanding of Managing Imports With Python’s __all__. By working through this quiz, you’ll revisit how wildcard imports work, what role the __all__ variable plays in modules and packages, and how to define a clean public API for your Python code. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short &…
Yesterday
Antigravity CLI is a terminal-based AI coding tool that brings Google’s agent assistance into your workflow. After installing it and signing in with your Google account, you can ask questions about your code, add new features, track down bugs, and even dispatch multiple subagents to work on separate tasks in parallel, all without leaving your shell: Antigravity CLI Antigravity CLI…
In this quiz, you’ll test your understanding of How to Use Google’s Antigravity CLI for AI Code Assistance. By working through this quiz, you’ll revisit how to install and authenticate the tool, prompt the agent to read and refactor your code, and review its work before it lands. You’ll also recall how to resume past conversations and hand parallel jobs…
24 Jul
Which is more important, the model or the "harness" around an LLM? What are ways to assemble an efficient agentic developer workflow? This week on the show, Ayan Pahwa joins us to discuss harnessing, web scraping, and self-hosting Python applications. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your…
23 Jul
In this quiz, you’ll test your understanding of A Guide to Excel Spreadsheets in Python With openpyxl. By working through this quiz, you’ll revisit how to read data from spreadsheets, create new workbooks, and work with cells, rows, and columns. You’ll also review adding formulas, styles, conditional formatting, images, and charts with openpyxl. Spreadsheets show up everywhere in data work,…
22 Jul
The Python lock file, pylock.toml, records exact dependencies your project needs so installs come out the same every time. It isn’t the first of its kind, though—most modern package tools already define their own lock formats. This has led to a fragmented landscape where reproducibility is often limited to a single tool’s workflow, with each ecosystem effectively speaking its own…
In this quiz, you’ll test your understanding of Tool-Agnostic Python Lock Files With PEP 751 and pylock.toml. By working through these questions, you’ll revisit how to generate a pylock.toml with pip, what its wheel metadata and hashes give you, how it compares to requirements.txt, and how tools like uv and pdm share the same lock file. A solid grasp of…
Learn FastAPI from the ground up. Build REST APIs, serve web pages with Jinja2 templates, and create a complete URL shortener project in Python. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
21 Jul
Python’s built-in functions are predefined functions you can use anywhere in your code without any imports. They handle common tasks across math, data type creation, iterable processing, and input and output. Knowing which ones to reach for makes your code shorter and more Pythonic. In this video course, you’ll: Recognize Python’s built-in functions and the built-in scope they live in…
In this quiz, you’ll test your understanding of Exploring Python’s Built-in Functions. By working through these questions, you’ll revisit Python’s built-in functions for math, data types, iterables, and input and output, and you’ll sharpen your sense of when to reach for each one to write more Pythonic code. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a…
In this quiz, you’ll revisit the core concepts covered in the FastAPI: Python API Development With Light Speed learning path: Learning Path FastAPI: Python API Development With Light Speed 5 Resources ⋅ Skills: FastAPI, REST APIs, Web Development, Jinja2 You’ll touch on installing and running FastAPI, defining routes and path parameters, validating input with Pydantic, mapping CRUD operations to HTTP…
20 Jul
The main data structure you’ll use in NumPy, Python’s core library for numerical computing, is the N-dimensional array. Sometimes you need to reorganize the values in a NumPy array into a different layout. That’s what NumPy’s reshape() is for. It changes an array’s shape without changing its data, so you can fit the same values into whatever configuration your program…
In this quiz, you’ll test your understanding of Using NumPy reshape() to Change the Shape of an Array. By working through these questions, you’ll revisit how to reshape an array into a compatible shape, add or remove dimensions, and use the order parameter to control how NumPy rearranges your data. Reshaping is a core skill when you work with NumPy…
17 Jul
How many attempts have been made to remove Python's Global Interpreter Lock (GIL)? How do they compare to the current approach? Christopher Trudeau is back on the show this week with another batch of PyCoder's Weekly articles and projects. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox…
15 Jul
In this tutorial, you’ll write CLAUDE.md files for Claude Code that capture your Python workflow, project commands, and coding rules. You’ll create a global file for personal defaults, a project-level file for repository guidance, and one for local notes that shouldn’t be committed to version control. To make these ideas concrete, you’ll work through a realistic example: steering Claude Code…
In this quiz, you’ll test your understanding of How to Write a CLAUDE.md File for Claude Code. You’ll revisit how to split guidance across global, project-level, and local files, audit Claude Code for repeated mistakes, and decide what belongs in a project-level CLAUDE.md that captures the commands and conventions Claude Code can’t easily infer. [ Improve Your Python With 🐍…
14 Jul
Mixins offer a powerful way to reuse code across multiple Python classes without forcing them into a rigid inheritance hierarchy. Instead of building deep and brittle class trees, you can use mixins to share common behaviors in a modular and flexible way. Learn when and how to implement mixin classes effectively in your Python projects. By the end of this…
In this quiz, you’ll test your understanding of Understanding Mixin Classes in Python. By working through this quiz, you’ll revisit how to write reusable mixin classes, tell them apart from abstract base classes, and steer clear of common pitfalls. Mixins let you share behavior across unrelated classes without forcing them into a rigid inheritance hierarchy. This quiz checks that you…
13 Jul
LangGraph is a versatile Python framework designed for stateful, cyclic, and multi-actor Large Language Model (LLM) applications. LangGraph builds upon its parent library, LangChain, and allows you to build sophisticated workflows that can handle the complexities of real-world LLM applications. Throughout this LangGraph tutorial, you’ll build a complete email-processing agent from the ground up. By the end of this tutorial,…
By working through this quiz, you’ll revisit how to build LLM workflows and agents in LangGraph, and how LangGraph expands upon LangChain’s capabilities. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
10 Jul
How can you improve your LLM agent systems through specification enrichment? What are the advantages of having an LLM act as a judge within an agent system? This week on the show, Senior IEEE Member and Quality Engineer Suneet Malhotra joins us to discuss building and evaluating agentic architecture. [ Improve Your Python With 🐍 Python Tricks 💌 – Get…
9 Jul
In this quiz, you’ll test your understanding of Build Enumerations of Constants With Python’s Enum. By working through this quiz, you’ll revisit how to create enumerations by subclassing Enum or using its functional API, how to access and compare members, and how specialized types like IntEnum and IntFlag extend enums with integer and bitwise behavior. Enums help you group related…
8 Jul
When you work on a local Python project, tracking your changes with Git is a great way to maintain a history of your code. However, keeping your repository only on your computer leaves your work vulnerable to hardware failures and makes collaboration difficult. By learning how to use GitHub, you can back up your work, share your code with the…
In this quiz, you’ll test your understanding of How to Use GitHub. By working through this quiz, you’ll revisit the core workflow for getting a local project onto GitHub: creating an empty remote repository, connecting it with git remote add, pushing your code, and collaborating through pull requests and issues. [ Improve Your Python With 🐍 Python Tricks 💌 –…
7 Jul
Building an MCP client in Python is a great way to test MCP servers directly from your terminal. In this video course, you’ll build a minimal MCP client for the command line. It can connect to an MCP server through the standard input/output (stdio) transport, list the server’s capabilities, and interact with the server’s tools, prompts, and resources directly and…
In this quiz, you’ll test your understanding of the video course Testing MCP Servers With a Python MCP Client. By working through it, you’ll revisit how to build a minimal command-line MCP client, connect it to a server through the stdio transport, and use a CLI to list, call, and inspect a server’s tools, prompts, and resources. [ Improve Your…
6 Jul
Python’s experimental JIT compiler has been riding along in CPython’s main branch since Python 3.13. It’s off by default and easy to forget about. In June, the Steering Council decided that the JIT needs a proper standards-track PEP, and it set a six-month clock to make that happen. Otherwise, the JIT gets taken back out of main. The JIT debate…
3 Jul
How do you avoid the risk of running a Python application locally that could be malicious, break your code, or leak private data? How can you create a sandboxed local environment using WASM and MicroPython? Christopher Trudeau is back on the show this week with another batch of PyCoder's Weekly articles and projects. [ Improve Your Python With 🐍 Python…
In this quiz, you’ll test your understanding of the Python Interfaces: Object-Oriented Design Principles video course. By working through this quiz, you’ll revisit how to model interfaces in Python, including informal interfaces and duck typing, custom metaclasses, and formal interfaces built with the abc module. You’ll also see how interfaces compare across languages like Java, C++, and Go. Interfaces help…
2 Jul
In this quiz, you’ll test your understanding of Natural Language Processing With Python’s NLTK Package. By working through these questions, you’ll revisit how to preprocess text by tokenizing, filtering stop words, stemming, and lemmatizing, how to tag parts of speech, chunk phrases, and recognize named entities, and how to analyze text with concordances, dispersion plots, frequency distributions, and collocations. A…
1 Jul
Python 3.15 sharpens the experimental Just-In-Time (JIT) compiler. It adds a new tracing frontend, basic register allocation, in-place int and float operations, tighter machine code, and more. In this tutorial, you’ll learn how to enable and benchmark the 3.15 JIT on your own machine and explore what makes it faster. By the end of this tutorial, you’ll understand that: Python…
In this quiz, you’ll test your understanding of Python 3.15 Preview: Upgraded JIT Compiler. By working through this quiz, you’ll revisit how to enable the experimental JIT compiler and confirm that it’s running. You’ll also recall what the optimizer does, explore the main upgrades that make Python 3.15 faster, and decide which workloads benefit most from turning the JIT on.…
30 Jun
Producing high-quality Python code involves using appropriate tools and consistently applying best practices. High-quality code is functional, readable, maintainable, efficient, and secure. It adheres to established standards and has excellent documentation. You can achieve these qualities by following best practices such as descriptive naming, consistent coding style, modular design, and robust error handling. To help you with all this, you…
In this quiz, you’ll test your understanding of the Managing and Measuring Python Code Quality course. By working through this quiz, you’ll revisit what separates high-quality code from code that merely works. You’ll cover how to make code functional, readable, efficient, and reusable, how to pick the right data structures, and how to keep your code secure. [ Improve Your…
29 Jun
The GitHub Copilot CLI brings AI-assisted coding into your terminal. Unlike the older gh copilot extension, which only suggests and explains shell commands, Copilot CLI is a standalone agentic app that answers questions, writes and debugs code, and interacts with GitHub.com services through natural-language prompts. For Python developers who feel at home on the command line, it offers a quick…
In this quiz, you’ll test your understanding of How to Get Started With the GitHub Copilot CLI. By working through this quiz, you’ll revisit how to install and authenticate the CLI, run one-shot and interactive prompts, use slash commands and agent modes, delegate work to subagents, and switch between AI models without leaving your terminal. [ Improve Your Python With…
26 Jun
Do you feel like your Python skills are atrophying after using LLM coding tools? How do you add the right kind of friction into your coding routine to keep your developer instincts sharp? Christopher Trudeau is back on the show this week with another batch of PyCoder's Weekly articles and projects. [ Improve Your Python With 🐍 Python Tricks 💌…
24 Jun
Most Django apps eventually need to defer slow work outside the request-response cycle. Django Tasks, the new built-in framework in Django 6.0, gives you a standard way to push that work onto a background worker instead of a view function that keeps a user’s browser waiting. Common examples of such work include sending welcome emails, processing image uploads, and generating…
In this quiz, you’ll test your understanding of Django Tasks: Exploring the Built-in Tasks Framework. By working through this quiz, you’ll revisit how to define a task with the @task decorator, enqueue it onto a background worker, check its result, and split fast and slow work across named queues. [ Improve Your Python With 🐍 Python Tricks 💌 – Get…
23 Jun
Discover how to use LlamaIndex with practical examples. This framework helps you build retrieval-augmented generation (RAG) apps using Python. LlamaIndex lets you load your data and documents, create and persist searchable indexes, and query an LLM using your data as context. In this course, you’ll learn the basics of installing the package, setting AI providers, spinning up a query engine,…
In this quiz, you’ll test your understanding of the Using LlamaIndex for RAG in Python course. By working through this quiz, you’ll revisit how RAG retrieves context to ground an LLM’s answers, how to load and index your own data, how to query it through a query engine, and why persisting your index saves time and money. [ Improve Your…
22 Jun
Data analysis is a broad term that covers a wide range of techniques for revealing insights and relationships in raw data. Data analysis with Python has become a default workflow in industry, thanks to a mature ecosystem of libraries like pandas, NumPy, Matplotlib, and scikit-learn. Once you’ve analyzed your data, you can use your findings to make sound business decisions,…
In this quiz, you’ll test your understanding of Using Python for Data Analysis. By working through this quiz, you’ll revisit the stages of a data analysis workflow, including cleansing raw data with pandas, spotting outliers and typos, and using regression to find relationships between variables. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet…
19 Jun
In this quiz, you’ll test your understanding of Using the Python zip() Function for Parallel Iteration. By working through these questions, you’ll revisit how zip() pairs up elements from multiple iterables, how to handle iterables of unequal length, and how to combine zip() with dict() and sorted() to solve everyday tasks. Whether you’re iterating over several sequences at once or…
18 Jun
In this quiz, you’ll test your understanding of Sorting a Python Dictionary: Values, Keys, and More. By working through this quiz, you’ll revisit using sorted() with lambdas and itemgetter() to sort dictionaries by keys, by values, or by nested attributes. You’ll also weigh the trade-offs of choosing a sorted key-value data structure. [ Improve Your Python With 🐍 Python Tricks…
17 Jun
Context engineering is the practice of curating the content that goes into an AI agent’s context window. In Python projects, that may mean pinning your dependency manager in an instruction file, trimming irrelevant history, delegating heavy tasks to subagents, and more. By the end of this tutorial, you’ll understand that: The context window holds everything the agent sees on a…
In this quiz, you’ll test your understanding of Context Engineering for Python Codebases. By working through this quiz, you’ll revisit the layers of an agent’s context window and the four strategies for managing it: Curate, Distill, Delegate, and Externalize. These ideas apply to any modern AI coding agent, so this quiz doubles as a checkpoint for your day-to-day Python workflow.…
16 Jun
When you’re learning Python, the sheer volume of topics to explore can feel overwhelming because there’s so much you could focus on. Should you dive into web frameworks before exploring data science? Is test-driven development something you need right away? And which skills actually matter to employers in the age of AI-assisted software development? By the end of this course,…
In this quiz, you’ll test your understanding of Develop Data Visualization Interfaces in Python With Dash. By working through this quiz, you’ll revisit how to build a Dash application with a layout, style components with CSS, wire up interactivity using the @app.callback decorator, and deploy your finished dashboard with a WSGI server. [ Improve Your Python With 🐍 Python Tricks…
In this quiz, you’ll test your understanding of Building Python Skills for the Job Market. By working through it, you’ll revisit how to choose a developer path, research what employers value, build a skill roadmap with SMART goals, design a weekly practice routine, and prepare for technical and AI-enabled interviews. There’s no code to write here. Instead, you’ll check your…
15 Jun
In object-oriented programming (OOP), an interface describes the methods a class must implement to play a specific role. This set of methods expresses the interface contract. Python has no dedicated syntax for interfaces, but it gives you two mechanisms for modeling them: abstract base classes and protocols. Python’s everyday duck typing takes advantage of both. By the end of this…
In this quiz, you’ll test your understanding of Implementing Interfaces in Python: ABCs and Protocols. By working through this quiz, you’ll revisit how to model interfaces with abstract base classes and protocols, how to enforce method contracts, and how duck typing lets unrelated classes work together. Interfaces help you write code that depends on what objects do rather than what…
12 Jun
What's happening at EuroPython 2026? The conference celebrates its 25th anniversary this year in Kraków, Poland. This week on the show, organizers Mia Bajić and Daria Linhart Grudzien join me to discuss this year's conference. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days.…
11 Jun
In this quiz, you’ll test your understanding of Serialize Your Data With Python. By working through this quiz, you’ll revisit how to choose between textual and binary formats, when to use schemas, and how to apply tools like pickle, json, the csv module, Parquet, and Protocol Buffers safely and effectively. [ Improve Your Python With 🐍 Python Tricks 💌 –…
10 Jun
AI-powered code editors have moved beyond novelty to become everyday tools for many Python developers. Instead of having to switch between your editor and a separate AI chat, you can use tools like Cursor and Windsurf that bring AI directly into your workflow. As a result, the Cursor vs Windsurf question is a common one for developers deciding which to…
9 Jun
One of the quickest ways to call multiple AI models from a single Python script is to use OpenRouter’s API, which acts as a unified routing layer between your code and multiple AI providers. By the end of this course, you’ll be able to access models from several providers through one unified API. This convenience matters because the AI ecosystem…
In this quiz, you’ll test your understanding of Embeddings and Vector Databases With ChromaDB. By working through this quiz, you’ll revisit key concepts like vectors, cosine similarity, word and text embeddings, ChromaDB collections, metadata filtering, and retrieval-augmented generation (RAG). [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox…
In this quiz, you’ll test your understanding of Accessing Multiple AI Models With the OpenRouter API. By working through this quiz, you’ll revisit how OpenRouter provides a unified routing layer, how to call AI models from a single Python script, how to switch between intelligent routing and a specific model, how to prioritize providers, and how to add model fallbacks…
8 Jun
While the Northern Hemisphere warms up for summer, Python 3.15 went the other way with its beta 1 feature freeze 🥶. Since May 7, the list of what will be included in the next release is final. That list includes a brand-new sentinel built-in that finally standardizes a pattern Python developers have been hand-rolling for decades. And while AI kept…
5 Jun
How can you easily reduce the size of a Python Docker container? What are the exceptions you should catch in your code? Christopher Trudeau is back on the show this week with another batch of PyCoder's Weekly articles and projects. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your…
4 Jun
In this quiz, you’ll test your understanding of How to Read User Input From the Keyboard in Python. By working through this quiz, you’ll revisit the input() function, type conversion, error handling with try and except, the getpass module for hidden input, and the PyInputPlus library for automatic validation. [ Improve Your Python With 🐍 Python Tricks 💌 – Get…
3 Jun
GitHub offers several AI tools under the Copilot umbrella that cover your entire development workflow. Copilot can provide an AI-powered code review shortly after you open a pull request on GitHub. Rather than waiting for a teammate, you can add Copilot as a reviewer to receive context-aware feedback. With access to your entire codebase, it delivers actionable suggestions that you…
In this quiz, you’ll test your understanding of How to Use GitHub Copilot Code Review in Pull Requests. By working through this quiz, you’ll revisit how to request a review from Copilot on your pull requests, apply or push back on its suggestions, configure automatic reviews, and use custom instructions to make Copilot’s feedback follow your team’s conventions. [ Improve…
2 Jun
You may have begun your Python journey interactively, exploring ideas within Jupyter Notebooks or through the Python REPL. While that’s great for quick experimentation and immediate feedback, you’ll likely find yourself saving code into .py files. However, as your codebase grows, knowing where things should go in your script becomes increasingly important. Transitioning from interactive environments to structured scripts helps…
In this quiz, you’ll test your understanding of Python’s Format Mini-Language for Tidy Strings. By working through this quiz, you’ll revisit how format specifiers work inside f-strings and str.format(), including alignment and width fields, decimal precision, type representations, thousand separators, sign handling, dynamic specifiers, and percentage formatting. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short…
In this quiz, you’ll test your understanding of the video course Structuring Your Python Script. By working through this quiz, you’ll revisit how to make a Python script executable with a shebang, organize your imports per PEP 8, automatically sort imports with ruff, and define a clear entry point using if __name__ == "__main__". These habits help you transition from…
1 Jun
Sometimes you need to make Python sleep, wait, or pause before running the next line of code. Whether you’re spacing out API requests, pacing a thread, or adding a delay to terminal output, Python’s time.sleep() function is the standard tool: Language: Python from time import sleep sleep(3) # Pause execution for 3 seconds Beyond time.sleep(), Python provides different ways to…
In this quiz, you’ll test your understanding of Regular Expressions: Regexes in Python (Part 1). By working through this quiz, you’ll revisit how to use the re module to search for patterns, build character classes and anchors, group and capture substrings, and apply flags like re.IGNORECASE to control matching behavior. [ Improve Your Python With 🐍 Python Tricks 💌 –…
29 May
Have you ever been confused by the naming of modules you're importing from a package? Is there a standard way to organize and name your Python virtual environments? This week on the show, Brett Cannon returns to discuss the Python Enhancement Proposals (PEPs) he's been working on recently. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a…
In this quiz, you’ll test your understanding of Python’s assert: Debug and Test Your Code Like a Pro. By working through this quiz, you’ll revisit how assertions help you debug, test, and document your code, when to disable them in production, and which common pitfalls to avoid. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short…
28 May
In this quiz, you’ll test your understanding of BNF Notation: Dive Deeper Into Python’s Grammar. By working through this quiz, you’ll revisit how to read Python’s grammar rules, recognize terminals and nonterminals, and interpret the BNF fragments that appear throughout the official documentation. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick…
27 May
You probably found this tutorial because you want to send emails with Python to automate confirmation messages, password resets, or scheduled notifications. Python’s standard library covers the whole pipeline, from making a server connection to building the message and sending it to one or many recipients. This tutorial walks through every step in working code. By the end of this…
In this quiz, you’ll test your understanding of Sending Emails With Python. By working through this quiz, you’ll revisit how to build messages with the EmailMessage class, secure your SMTP connection, attach files, send HTML alternatives, route replies to a different mailbox, and address multiple recipients at once. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a…
26 May
The Model Context Protocol (MCP) is a new open protocol that allows AI models to interact with external systems in a standardized, extensible way. In this video course, you’ll install MCP, explore its client-server architecture, and work with its core concepts: prompts, resources, and tools. You’ll then build and test a Python MCP server that queries e-commerce data and integrate…
25 May
Visualizing data is a core part of analysis, and Python’s most popular plotting library is Matplotlib. To make a scatter plot, you reach for plt.scatter() from Matplotlib’s pyplot submodule, conventionally aliased as plt. You’ll use it to build both simple two-variable charts and richly customized plots that encode several variables at once. By the end of this tutorial, you’ll understand…
22 May
How can you avoid schema problems in your Polars data pipeline when adding new columns? How can you quickly examine a GitHub user's profile to decide how much to invest in their contributions? Christopher Trudeau is back on the show this week with another batch of PyCoder's Weekly articles and projects. [ Improve Your Python With 🐍 Python Tricks 💌…
20 May
The fastest way to use the Claude API in Python is to install anthropic, set your API key, and call client.messages.create(). You’ll have a working response in under a minute: Example of Using the Claude API in Python Claude is Anthropic’s large language model, accessible via a clean REST API with an official Python SDK. Unlike heavier AI frameworks that…
19 May
The Zen of Python is a collection of 19 aphorisms that capture the guiding principles behind Python’s design. You can display them anytime by running import this in a Python REPL. Tim Peters wrote them in 1999 as a joke, but they became an iconic part of Python culture that was even formalized as PEP 20. By the end of…
18 May
Python’s built-in functions are predefined functions you can use anywhere in your code without any imports. They handle common tasks across math, data type creation, iterable processing, and input and output. Knowing which ones to reach for makes your code shorter and more Pythonic. In this tutorial, you’ll: Recognize Python’s built-in functions and the built-in scope they live in Use…
15 May
What are the limitations of using a file-based agent workflow? Why do massive context windows tend to collapse? This week on the show, Mikiko Bazeley from MongoDB joins us to discuss agentic architecture and context engineering. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of…
13 May
OpenCode is an open-source AI coding agent that runs in your terminal and lets you analyze and refactor a Python project through conversational commands. In this guide, you’ll install it on your system, set it up with a free Google Gemini API key, and learn the basics of how to use it in your daily programming work. Here’s what OpenCode’s…
12 May
Pydantic AI is a Python framework for building LLM agents that return validated, structured outputs using Pydantic models. Instead of parsing raw strings from LLMs, you get type-safe objects with automatic validation. If you’ve used FastAPI or Pydantic before, then you’ll recognize the familiar pattern of defining schemas with type hints and letting the framework handle the type validation for…
11 May
Flattening a list in Python involves converting a nested list structure into a single, one-dimensional list. A common approach to flatten a list of lists is to use a for loop to iterate through each sublist. Then you can add each item to a new list with the .extend() method or the augmented concatenation operator (+=). This will “unlist” the…
8 May
What if you could build charts in Python by describing what your data means, instead of scripting every visual detail? Christopher Trudeau is back on the show this week with another batch of PyCoder's Weekly articles and projects. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every…
5 May
After watching this video course, you’ll be able to use Codex CLI to add features to a Python project directly from your terminal. Codex CLI is an AI-powered coding assistant that runs inside your terminal. It understands your project structure, reads your files, and proposes multi-file changes using natural language instructions. Instead of copying code from a browser or relying…
1 May
How do you add agent skills to your data science workflow? How can a coding agent assist with data wrangling and research? This week on the show, Trevor Manz from marimo joins us to discuss marimo pair. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple…
28 Apr
The Python standard library ships with a testing framework named unittest, which you can use to write automated tests for your code. The unittest package has an object-oriented approach where test cases derive from a base class, which has several useful methods. The framework supports many features that will help you write consistent unit tests for your code. These features…
24 Apr
How can learning Rust help make you a better Python Developer? How do techniques required by a compiled language translate to improving your Python code? Christopher Trudeau is back on the show this week with another batch of PyCoder's Weekly articles and projects. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick…
21 Apr
Python’s openai library provides the tools you need to integrate the ChatGPT API into your Python applications. With it, you can send text prompts to the API and receive AI-generated responses. You can also guide the AI’s behavior with developer role messages and handle both simple text generation and more complex code creation tasks. After watching this video course, you’ll…
17 Apr
What are the current techniques being employed to improve the performance of LLM-based systems? How is the industry shifting from post-training towards context engineering and multi-agent orchestration? This week on the show, Jodie Burchell, data scientist and Python Advocacy Team Lead at JetBrains, returns to discuss the current AI coding landscape. [ Improve Your Python With 🐍 Python Tricks 💌…
16 Apr
Build Python games from command-line projects to 2D graphical games with turtle, Tkinter, Pygame, and Arcade. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
14 Apr
The era of large language models (LLMs) is here, bringing with it rapidly evolving libraries like ChromaDB that help augment LLM applications. You’ve most likely heard of chatbots like OpenAI’s ChatGPT, and perhaps you’ve even experienced their remarkable ability to reason about natural language processing (NLP) problems. Modern LLMs, while imperfect, can accurately solve a wide range of problems and…
10 Apr
The Real Python Podcast – Episode #290: Advice on Managing Projects & Making Python Classes Friendly
What goes into managing a major project? What techniques can you employ for a project that's in crisis? Christopher Trudeau is back on the show this week with another batch of PyCoder's Weekly articles and projects. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of…
7 Apr
Logging is a vital programming practice that helps you track, understand, and debug your application’s behavior. Loguru is a Python library that provides simpler, more intuitive logging compared to Python’s built-in logging module. Good logging gives you insights into your program’s execution, helps you diagnose issues, and provides valuable information about your application’s health in production. Without proper logging, you…
27 Mar
With the mountains of Python code that it's possible to generate now, how's your code review going? What are the limitations of human review, and where does machine review excel? Christopher Trudeau is back on the show this week with another batch of PyCoder's Weekly articles and projects. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a…
19 Mar
Build LLM-powered applications in Python. Call model APIs, craft prompts, add retrieval-augmented generation, create AI agents, and connect via MCP. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
7 Dec 2025
Use AI coding assistants to write, review, and debug Python code faster. Pick from Claude Code, Cursor, or Gemini CLI and start coding. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
14 Nov 2024
Learn Python control flow and loops. Use conditional statements, Boolean operators, for and while loops, and keywords like break and continue. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
Set up a Python development environment with VS Code, PyCharm, virtual environments, Git, pyenv, Docker, and AI coding tools like Claude Code and Cursor. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
Learn network programming and security in Python. Work with CRUD operations, REST APIs, HTTPS, and socket programming to build networked apps. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
Build Python GUI applications with Tkinter, PyQt, wxPython, and Kivy. Learn layouts, event handling, threading, and database integration. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
Explore Python standard library modules including math, datetime, JSON, CSV, regex, subprocess, and argparse through hands-on tutorials and courses. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
Learn Python's import system, organize code into modules and packages, manage dependencies with pip, and publish to PyPI. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
Learn to define Python functions, use parameters and return values, create inner functions, and understand namespaces and scope. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
Learn Python's built-in data structures: strings, lists, tuples, dictionaries, sets, and bytes, plus sorting, copying, and comprehensions. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]