A gentle, practical introduction to logging in Python Why bother with a dedicated logging library? Prints don’t scale. print() is fine during quick experiments, but real programs need a record that can be filtered, rotated, or shipped elsewhere. Separation of concerns. You decide what to log in your code; logging decides where and how to write it (console, file, etc.). Built-in, no extra dependency. The standard library’s logging module is powerful enough for most applications.
From Type Hint to Power Tool: Python’s Pathlib For a long time, I used Path from Python’s pathlib module purely as a type hint - a way to make function signatures look more modern and semantically clear. Like this:
from pathlib import Path def process_file(file_path: Path): ... It changed when I started building an application that handled user-uploaded documents. I had to create temporary folders, write intermediate files, manage output paths, and ensure directories existed before saving results.
If you’re working with Git and Vim, vim-fugitive is an essential plugin that transforms your editor into a full-fledged Git interface. Here’s how I use Fugitive to review, stage, and commit changes—without ever leaving Vim.
Browsing Git History and Logs First Before jumping into edits, it’s often useful to understand the file’s history or recent project changes.
:Git log — shows the project’s commit history in reverse chronological order :0Gllog — shows the history of the current file To explore who changed what in a file:
📝Update (2025-09-06): I’ve added a new section on using --native-tls with corporate proxies. It covers why uv may fail with SSL errors at work and how to fix it by making uv trust your system certificates.
Meet uv – A Blazingly Fast, All‑in‑One Python Package Manager In my last post, I covered Poetry. It’s a solid dependency manager—but it still leaves you juggling other tools: pip for installs, virtualenv for isolation, pyenv for Python versions, and pip-tools or Pipenv for locks.
DeepSeek’s latest moves have sent ripples through the AI community. Not only has it marked the beginning of a new era in artificial intelligence, but it has also made significant contributions to the open-source AI landscape. Their engineering techniques behind DeepSeek are truly impressive, and their reports are quite enjoyable. However, understanding their core ideas can be challenging and demands a substantial amount of effort.
At the forefront of this innovation is DeepSeek-R1, a model that built upon the foundation established by preceding projects such as DeepSeek Coder, Math, MoE, and notably, the DeepSeek-V3 model.
Introduction When it comes to writing clean, maintainable, and scalable Python code, design matters. As your projects grow, you’ll often find yourself needing to enforce structure, ensure consistency, and promote reusability. This is where Python’s Abstract Base Classes (ABCs) and Protocols come into play—two powerful features that help you design better software.
Abstract classes act as blueprints for other classes, allowing you to define methods that must be implemented by any subclass.