PythonHub
2.33K subscribers
2.35K photos
49K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
Django 5.1 released

Django 5.1 introduces LoginRequiredMiddleware for easier authentication enforcement, accessibility enhancements like improved screen reader support and better HTML semantics, and a new querystring template tag for simpler URL handling in templates.

https://www.djangoproject.com/weblog/2024/aug/07/django-51-released/
RAG Fundamentals and Advanced Techniques

This course will guide you through the basics of Retrieval-Augmented Generation (RAG), starting with its fundamental concepts and components. You'll learn how to build a RAG system for chatting with documents, explore advanced techniques, and understand the pitfalls of naive RAG.

https://www.youtube.com/watch?v=ea2W8IogX80
Log context propagation in Python ASGI apps

The article explains how to implement log context propagation in Python ASGI applications using middleware to automatically tag log messages with contextual information like user ID and platform. This approach simplifies logging by eliminating the need for manual context passing across different layers of an application, ensuring all logs within a request-response cycle are consistently ...

https://rednafi.com/python/log_context_propagation/
Crawling Pages with Infinite Scroll using Scrapy and Playwright

This post provides a detailed guide on how to scrape infinite scroll websites using Scrapy and Playwright in Python. It covers the setup process, explains how to implement a custom downloader middleware to handle JavaScript rendering, and demonstrates how to extract data from dynamically loaded content, offering a practical solution for web scraping challenges posed by modern web applica...

https://www.xiegerts.com/post/infinite-scroll-scrapy-playwright/
FlexAttention: The Flexibility of PyTorch with the Performance of FlashAttention

https://pytorch.org/blog/flexattention/
Some more batteries to do stuff with Mapping related data structures

This library provides utility functions for manipulating and transforming data structures which have or include Mapping-like characteristics.

https://github.com/erivlis/mappingtools
CSVs Are Kinda Bad. DSVs Are Kinda Good.

The article argues that CSVs (Comma-Separated Values) are problematic due to various edge cases involving delimiters, quotes, and newlines, and proposes using Delimiter-Separated Values (DSV) with ASCII control characters as a more robust alternative. It demonstrates how DSVs can handle complex data without escaping or quoting issues, but acknowledges that the lack of widespread tool sup...

https://matthodges.com/posts/2024-08-12-csv-bad-dsv-good/