Python HubInteresting articles and projects for Python developers.
— x.com/PythonHub
— telegram.me/PythonHub
— mastodon.social/@pythonhub
— bluesky/@pythonhub.dev
— WhatsApp Python Hub Channel
— On Patreon, just $1 per month
Share a news, article or interesting project. Link will be published after manual review.
Subscribe to Python Hub Weekly Digest
Nifty Django Feature: Use Index for Custom Migration Operations
Part of the Nifty Django features series: You can hack Django's Index class to define custom migration operations on your model.
KV, Prefix, Prompt and Semantic Caching in LLMs, clearly explained
The post explains the four caching layers in LLM stacks: KV cache, prefix caching, prompt caching, and semantic caching, covering what each stores, their trade-offs, interactions, and the most common issues that prevent reuse. It includes first-principles explanations, code demos (with transformers and vLLM-style logic), production pitfalls, and practical takeaways for reducing recomputa...
Tracing np.add, all the way down
The author traces a simple np.add(a, b) call through NumPy’s internals, from Python argument handling and dtype dispatch to iteration strategy and the final SIMD-optimized C loop. Along the way, the post explores ufunc overrides, type promotion, dispatch caching, memory layout, GIL release, and CPU-specific optimizations that determine how NumPy actually performs an addition.
When to use NotImplemented
When should you return NotImplemented from a dunder method? Why not return False or raise an exception instead?
Django API Overview - DRF, django-ninja, django-bolt and django-modern-rest
In this video, we'll look at Django API options, exploring the best modern packages for API-driven development in Django. We will take a look at Django REST Framework, django-ninja, django-bolt, and django-modern-rest - looking at the pros/cons of each.
HTTPX2 – A next-generation HTTP client for Python
IPython is All You Need
Nathan Cooper shows how to turn IPython into a full terminal shell that runs Bash commands without !, displays images, and retains rich execution history. He then adds an AI assistant that can understand shell context, outputs, images, and errors, and safely execute Python and Bash commands through allowlisted tools.
When str.lower() is a security vulnerability in Python
A Python security vulnerability caused IDNA 2003 handling to use the interpreter’s current Unicode case-folding rules instead of the Unicode 3.2 rules required by the specification.The fix makes Python’s case-folding behavior match Unicode 3.2 for StringPrep, restoring standards-compliant IDNA encoding and addressing CVE-2026-17084.
linecast
Weather, tides, the sun, the moon, and maps, in your terminal. The Old Farmer's Almanac meets Minitel.
Tech-OA-Interview-Questions
Daily updated list of Tech Company OAs and Interview Problems. Save your time from finding them all over the internet.
2026-09-06 · 2026-08-30 · 2026-08-23 · 2026-08-16 · 2026-08-09 · 2026-08-02 · 2026-07-26 · 2026-07-19 · 2026-07-12 · 2026-07-05 · 2026-06-28 · 2026-06-21 · 2026-06-14 · 2026-06-07 · 2026-05-31 · 2026-05-24 · 2026-05-17 · 2026-05-10 · 2026-05-03 · 2026-04-26 · 2026-04-19 · 2026-04-12 · 2026-04-05 · 2026-03-29 · 2026-03-22 · 2026-03-15 · 2026-03-08 · 2026-03-01 · 2026-02-22 · 2026-02-15 · 2026-02-08 · 2026-02-01 · 2026-01-25 · 2026-01-18 · 2026-01-11 · 2026-01-04 · 2025-12-28 · 2025-12-21 · 2025-12-14 · 2025-12-07 · 2025-11-30 · 2025-11-23 · 2025-11-16 · 2025-11-09 · 2025-11-02 · 2025-10-26 · 2025-10-19 · 2025-10-12 · 2025-10-05 · 2025-09-28 · 2025-09-21 · 2025-09-14 · 2025-09-07 · 2025-08-31 · 2025-08-24 · 2025-08-17 · 2025-08-10 · 2025-08-03 · 2025-07-27 · 2025-07-20
Project by Ruslan Keba. Since 2012. Powered by Python. Made in 🇺🇦Ukraine.