PythonHub
2.53K subscribers
2.35K photos
50.1K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
nb-cli: A Command-Line Interface for AI Agents and Notebook Automation

The article introduces nb-cli, a Rust-built command-line interface engineered to let developers and AI agents programmatically read, write, and execute Jupyter notebooks without needing a running server. It highlights an AI-optimized Markdown format that exposes structured token-efficient code and cell metadata, enabling language models and automated CI/CD pipelines to manipulate noteboo...

https://blog.jupyter.org/nb-cli-a-command-line-interface-for-ai-agents-and-notebook-automation-996ad7edacd9
django-q2 - Background Tasks in Django (Celery alternative!)

The video explores django-q2, a lightweight alternative to Celery for handling background jobs and asynchronous task processing in Django applications. It highlights how django-q2 simplifies setup and integration while providing built-in support for async workers, scheduled tasks, and Django Admin management features.

https://www.youtube.com/watch?v=0hRDCrxfHug
Watching for file changes on macOS

This post details how to build a lightweight tool for monitoring file system activity on macOS without relying on third-party dependencies. It explains how to implement a Swift script that interfaces directly with Apple's native FSEvents API and forwards those live change notifications to a Python environment via stdout.

https://alexwlchan.net/2026/watch-files-on-macos/
Agent Hooks: Deterministic Control for Agent Workflows

The post is about agent hooks as a control layer that makes AI behavior more deterministic by enforcing rules at specific lifecycle points, instead of relying on prompts alone. It emphasizes using hooks for policy enforcement, validation, and observability so teams can block bad actions, add guardrails, and make agent workflows more production-safe.

https://nader.substack.com/p/agent-hooks-deterministic-control
Let’s Fix Bloated Python Classes Once and For All

The video demonstrates how a single Python class can gradually become overloaded with unrelated responsibilities like validation, data processing, and model training, making the code harder to maintain and reason about. It then walks through refactoring the code into smaller, focused components while introducing a practical framework for deciding what logic should and should not belong i...

https://www.youtube.com/watch?v=F5Av5yDGSQs
Bridging Python's Logging Module to OpenTelemetry (Complete Guide)

This guide walks through using the OpenTelemetry Python SDK's LoggingHandler to bridge Python's built-in logging module with an OpenTelemetry-compliant pipeline without changing your existing log statements. It demonstrates how to configure the handler (via dictConfig), map standard log records into structured OTel fields, and automatically correlate logs with active traces to route them...

https://www.dash0.com/guides/opentelemetry-logging-python