Latest AI and tech news
In this quiz, you’ll test your understanding of Socket Programming in Python. Sockets and the socket API are used to send messages across a network. They provide a form of inter-process communication (IPC)....
We asked GPT-6.1 Terra to draw a python reading a book using the turtle module. It’s one of five tasks in Real Python’s informal model comparison, which explores how models handle everyday Python work. Here’s the drawing from this run:...
The Requests library is the go-to package for making HTTP requests in Python. It abstracts the complexities of making requests behind an intuitive API. Though not part of Python’s standard library, it’s worth considering Requests to perform HTTP acti...
PEP 8, sometimes spelled PEP8 or PEP-8, is the official style guide for Python code. PEP 8 gives guidelines on naming conventions, code layout, and other best practices. Guido van Rossum, Barry Warsaw, and Alyssa Coghlan wrote it in 2001 with a focus...
In Python, understanding inheritance and composition is crucial for effective object-oriented programming. Inheritance allows you to model an is a relationship, where a derived class extends the functionality of a base class. Composition, on the othe...
In Python, the range() function generates a sequence of numbers, often used in loops for iteration. By default, it creates numbers starting from 0 up to but not including a specified stop value. You can also reverse the sequence with reversed(). If y...
Getter and setter methods allow you to access and mutate non-public attributes while maintaining encapsulation. In Python, you’ll typically expose attributes as part of your public API and use properties when you need attributes with functional behav...
How does Python manage memory behind the scenes? What are the common ways to lay out a Python project? Christopher Trudeau is back on the show this week with another batch of PyCoder's Weekly articles and projects....
In this quiz, you’ll test your understanding of Python’s Mutable vs Immutable Types: What’s the Difference?....
In this quiz, you’ll test your understanding of
Inheritance and Composition in Python....
I’d been writing Python for a couple of years before async programming made sense to me. I understood the general idea, but the syntax just never felt like Python. Why would calling a function with () not run it, and what exactly was I supposed to aw...
In this quiz, you’ll test your understanding of
Learn With Mentor AI: A Guided Journey Through Async Python....
In this quiz, you’ll test your understanding of
Dictionaries and Arrays: Selecting the Ideal Data Structure....
Building an MCP client in Python can be a good option when you’re coding MCP servers and want a quick way to test them. In this step-by-step project, you’ll build a minimal MCP client for the command line. It’ll be able to connect to an MCP server th...
In this quiz, you’ll test your understanding of
Creating a Scalable Flask Web Application From Scratch....
A Python circular import happens when two modules import each other and one of them isn’t finished loading yet. Python reports it as an ImportError or an AttributeError, usually with a message about a partially initialized module. In this tutorial, y...
Tutorial hell is an unfortunate reality for many newcomers to Python, and learning how to get out of it starts with understanding why it’s so easy to fall into. When you’re a beginner, finishing tutorials is addictive! They make learning Python appro...
Pyrefly is a fast static type checker for Python that helps you catch type-related issues before running your code. It also includes features for generating type hints and measuring type coverage across a codebase....
Anthropic open-sourced the Model Context Protocol (MCP) in November 2024 to fix a scaling problem: every new tool a model reached for needed its own integration, built on direct API calls. Building that integration today involves a decision usually f...
AI coding agents can read your code, reason about changes, and act on your behalf. To choose the right one, it helps to understand the four common workflow types: integrated development environment (IDE), terminal, pull request (PR), and cloud....
In this quiz, you’ll test your understanding of
How to Get Out of Tutorial Hell....
In this quiz, you’ll test your understanding of
MCP vs API Calls: Which Should You Use for Python LLM Apps?....
In this quiz, you’ll test your understanding of
Pyrefly: A Fast Static Type Checker for Python Projects....
In this quiz, you’ll test your understanding of
Exploring AI Coding Agent Workflows....
In this quiz, you’ll test your understanding of
Python Circular Imports: Why They Happen and How to Fix Them....
Python has a few naming conventions that are based on using either a single or double underscore character (_). These conventions allow you to differentiate between public and non-public names in APIs, write subclasses safely, prevent name collisions...
In Python, a protocol specifies the methods and attributes that a class must implement to be considered of a given type. Protocols are important in Python’s type hint system, which allows for static type checking through external tools, such as mypy,...
When building Python command-line interfaces (CLI), Python’s argparse module offers a comprehensive solution. You can use argparse to create user-friendly command-line interfaces that parse arguments and options directly from the command line. This t...
Have you ever had to work with a dataset so large that it overwhelmed your machine’s memory? Or maybe you have a complex function that needs to maintain an internal state every time it’s called, but the function is too small to justify creating its o...
You’ve probably seen the option for Google Login on various websites. Some sites also have more options like Facebook Login or GitHub Login. All these options allow users to utilize existing accounts to use a new service....
Learning the basics of Python is a wonderful experience. But the euphoria of just learning can be replaced by the hunger for hands-on projects. It’s normal to want to build projects, hence the need for project ideas....
ChromaDB is an open-source vector database built for applications that use large language models (LLMs). LLMs like the ones behind OpenAI’s ChatGPT can reason about natural language processing (NLP) problems remarkably well, but on their own, they on...
The uv tool is a high-speed package and project manager for Python. It’s written in Rust and designed to streamline your workflow. It offers fast dependency installation and integrates various functionalities into a single tool....
Python web scraping allows you to collect and parse data from websites programmatically. With powerful libraries like urllib, Beautiful Soup, and MechanicalSoup, you can fetch and manipulate HTML content effortlessly. By automating data collection ta...
AI agents don’t just answer questions anymore. They read your files, search the web, and take actions on your behalf. In this video course, you’ll learn how they really work, from models and harnesses to context and skills, so you can get better resu...
In this quiz, you’ll test your understanding of
Working With APIs in Python: Reading Public Data....
By working through this quiz, you’ll revisit how Python’s uv integrates multiple functionalities into one tool, offering a comprehensive solution for managing Python projects....
In this quiz, you’ll test your understanding of Python generators....
In this quiz, you’ll test your understanding of
Web Scraping in Python....
Logging in Python lets you record important information about your program’s execution. You use the built-in logging module to capture logs, which provide insights into application flow, errors, and usage patterns. With Python logging, you can create...
This article explores Python modules and Python packages, two mechanisms that facilitate modular programming....
Most modern web applications are powered by a REST API under the hood. That way, developers can separate the front-end code from the back-end logic, and users can interact with the interface dynamically. In this three-part tutorial series, you’re bui...