pyproject.toml: Modern Python Dependency Management
Introduction pyproject.toml is the contract behind modern Python dependency management. Older projects relied on setup.py or guessed build requirements, which...
Introduction pyproject.toml is the contract behind modern Python dependency management. Older projects relied on setup.py or guessed build requirements, which...
My background scrapers run on PythonAnywhere. My phone runs Termux. I wanted the scrapers to ping my phone when something interesting happened — without Firebas...
Introduction Most Python CLI tools start simple but quickly become messy. You begin with a command or two, then add prompts, state handling, output formatting,...
Python projects will now see more complete and accurate transitive dependency trees in their dependency graphs and Software Bills of Materials SBOMs. This featu...
Overview Working with CSV files can be frustrating. You often wonder: - Are there missing values? - Are there duplicate rows? - Which column is the actual ID?...
Controlling the Square with Keyboard Input In Part 2 we had a square moving on a grid. Now we’ll make it respond to KEYDOWN events so the player can control it...
Introduction In part 1 we set up a basic pygame window with a 1000 × 1000 pixel canvas and a 50 × 50 pixel square that moved continuously. For the snake game w...
Introduction Pygame is a module that lets us create 2D games with Python. It’s a great way to learn programming concepts, and the classic game Snake makes an e...
How to Validate Indian Pincode Using Python Region, Sub‑Region and District Finder The following script validates a 6‑digit Indian pincode and returns the corr...
Introduction You can build lists in Python with a loop, but list comprehensions let you do the same work in a single, readable line. python numbers = 1, 2, 3,...
Hi everyone, I recently completed the 2026 Goldman Sachs Coding Interview. The interview mainly focuses on real coding ability, data‑structure design, and probl...
I’ve been building AI agents at work and kept running into the same problem: every framework lets agents call any registered tool with zero safety checks. An ag...
Introduction I’m back after a long hiatus, this time focusing on job searching and revisiting recent CVEs. One common source of vulnerabilities is string inter...
Most workflow libraries require you to run an additional service. Celery needs Redis, Temporal needs its own server, and so on. Gravtory leverages the database...
What is a class? A class is a blueprint for creating objects. An object is an instance of a class. Define a simple class python class Dog: pass Create an objec...
Introduction Ever wish you had a magical button to eliminate repetitive daily tasks? Python can be that button. Beyond web apps and data science, Python lets y...
Python Selenium Architecture - Python Test Script – Write automation code that instructs actions such as opening a website, clicking buttons, or entering text....
What I Built A pull request review tool that does absolutely nothing useful. You paste your tea recipe. A senior engineer reviews it. Every step has critical i...
!Cover image for Building a simple async scheduler with generators in Pythonhttps://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,for...
Problem When running pip install -r requirements.txt on a machine‑learning project, the console produces hundreds of lines of output: download progress bars, w...
Introduction Hi all, Finding a good data structure for a word processor is a difficult problem. My notebook diaries on the problem go back 25 years when I was...
The Problem Building a new SaaS project is exciting—until you realize you have to rewrite the same infrastructure code over and over. Between tracking pending...
The Prompt Chaos For a year I treated LLMs like a command line: type instructions, pray for output, tweak wording, add “IMPORTANT:”, move sentences around like...
Problem Description Count the total number of palindromic substrings in a given string, where a palindromic substring reads the same forwards and backwards. Ap...
Problem Find the length of the longest substring containing the same letter that you can obtain after performing at most k character replacements. You may repl...
Problem Statement Find the length of the longest strictly increasing subsequence in an array of integers. A subsequence maintains the relative order of element...
Problem Description Find the length of the longest increasing path in a matrix where you can move in four directions up, down, left, right to adjacent cells wi...
Problem Overview Find the length of the longest common subsequence LCS between two strings, where a subsequence maintains the relative order of characters but...
Problem Description Given the head of a linked list, determine if the linked list contains a cycle. A cycle exists if some node can be reached again by continu...
Problem Find the area of the largest rectangle that can be formed in a histogram represented by an array of bar heights. Each bar has width 1 and the rectangle...
Problem Description Find the kth smallest element in a Binary Search Tree BST, where k is 1‑indexed. The function should return the value of the kth smallest n...
Have you ever tried to open your Apple Health export.xml file? If you've been wearing an Apple Watch for more than a year, that file is likely a multi‑gigabyte...
JSON won the internet. We all know that. But XML never left — it just moved. Reliability matters more than trendiness. If you work with Maven configs, Android m...
From the Author D‑MemFS was featured in Python Weekly Issue 737 19 Mar 2026 under Interesting Projects, Tools and Libraries. Being picked up by one of the most...
Summary of previous approaches - Using setdefault - Using defaultdict - Implementing __missing__ Subclassing dict: important nuances - __contains__ does not ca...
newshttps://www.truesec.com/hub/blog/malicious-pypi-package-litellm-supply-chain-compromise Details A malicious supply‑chain compromise has been identified in t...
Build Log April 8, 2026 Implemented the first production‑ready telemetry collectors for heka‑insights‑agent and wired them into the main polling loop. - Added...
Week 15 of building in public. The agent writes. The bots trade. The code doesn’t write itself. Wednesday, 07:01 UTC Monday’s build‑log entry committed to somet...
Installation bash pip install pillow Importing the library python from PIL import Image Resizing an image python Open the original image img = Image.openr'C:Us...
Introduction In my journey to build Echo, my local AI companion, one of the key challenges has been ensuring that Echo can autonomously publish content to dev....
On Preventing Things Through Structure Embellishing interpretations and fabrication share the same root—I realized that in the previous article. To prevent rec...
Un caso de uso de Mermaid para comunicar arquitectura a producto Hay un momento en la carrera de casi todo desarrollador en el que te das cuenta de que el códi...
The Idea The fix seemed obvious: Ctrl + V should be context‑aware. - In a terminal, if an image is on the clipboard, paste the file path instead of the raw ima...
The 5‑Minute “Hello World” Comparison Whether you are a TypeScript veteran or a Python enthusiast, building an MCP server is surprisingly simple. Below are “He...
It Started with a Simple Question “How fast is it?” That’s the question I always ask when I write a Python package. Not “does it work?”—because obviously it wo...
The “It's Just a Small Library” Trap We've all been there. You find a Python package that promises to solve your problem with minimal overhead. The README says...
Introduction In this article, I’ll share why I started integrating Python into industrial monitoring and how it’s helping eliminate the critical “blind spots”...
Defining Matrices python matrix = 1, 2, 3, 4, 5, 6, 7, 8, 9 Creating a 3x3 Matrix python matrix_3x3 = 0 3 for in range3 Common Matrix Problems Transpose a Matr...