PythonHub
2.44K subscribers
2.35K photos
49.2K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
AsyncIO - Complete Guide to Asynchronous Programming with Animations

The video teaches how to write asynchronous code in Python using AsyncIO with async/await syntax. It covers core concepts like coroutines, tasks, and the event loop, shows how to convert synchronous code to async, and demonstrates performance benefits using real-world examples and animations.

https://www.youtube.com/watch?v=oAkLSJNr5zY
We Needed Better Cloud Storage for Python so We Built Obstore

Obstore is a fast, lightweight Python library for working with object storage—backed by Rust and built for clarity, speed, and interoperability. It’s already being used across cloud-native geospatial tools and supports common workflows out of the box.

https://developmentseed.org/blog/2025-08-01-obstore/
👍1
Preventing Domain Resurrection Attacks

PyPI has implemented new security measures to prevent domain resurrection attacks, where expired domains are re-registered by attackers to hijack accounts via password resets. Since June 2025, PyPI has unverified over 1,800 email addresses tied to expiring domains, blocking these addresses from being used for account recovery and enhancing account security.

https://blog.pypi.org/posts/2025-08-18-preventing-domain-resurrections/
Pro-Tip – Sometimes LFU > LRU

This article discusses how AI/web crawlers create excessive sessions that push legitimate user sessions out of cache, degrading user experience on sites like e-commerce platforms. It suggests configuring Redis with an LFU (Least Frequently Used) eviction policy, rather than the common LRU (Least Recently Used), to preferentially keep frequently used sessions (like those of real users) wh...

https://www.revsys.com/tidbits/sometimes-lfu-lru/
Weaponizing image scaling against production AI systems

Attackers can hide malicious prompts in images that become visible only after being downscaled—tricking AI systems like Gemini CLI and Vertex AI Studio into executing hidden instructions. Trail of Bits demonstrates these “image scaling” exploits and introduces Anamorpher, an open-source tool to craft and test such attacks, while also proposing defenses.

https://blog.trailofbits.com/2025/08/21/weaponizing-image-scaling-against-production-ai-systems/
How to Build an Advanced AI Agent with Search (LangGraph, Python, Bright Data & More)

The video demonstrates building a multi-step, scalable AI research agent in Python using LangGraph. The agent can pull live search data from sources like Google, Bing, and Reddit, aggregate and analyze the information, and provide comprehensive answers, showcasing advanced Python coding, complex architecture, and effective use of APIs like Bright Data and OpenAI GPT. The tutorial covers ...

https://www.youtube.com/watch?v=cUC-hyjpNxk
From GPT-2 to gpt-oss: Analyzing the Architectural Advances

The article analyzes the architectural advances from GPT-2 to OpenAI’s new open-weight gpt-oss models, highlighting innovations like Mixture-of-Experts, grouped query attention, and sliding-window layers for efficiency and scaling. He compares these changes with models like Qwen3 and notes how gpt-oss is optimized for reasoning, tool use, and agentic workflows, while remaining memory-eff...

https://magazine.sebastianraschka.com/p/from-gpt-2-to-gpt-oss-analyzing-the
How to Write Great Unit Tests in Python

The video teaches how to write effective and maintainable unit tests in Python, focusing on practical techniques such as mocking, monkey patching, fixtures, and parametrization with pytest. It uses a realistic WeatherService example to demonstrate these concepts, emphasizing best practices for robust testing and improving code quality in production systems.

https://www.youtube.com/watch?v=EIV_ixKGPmc
oLLM

oLLM is a lightweight Python library for large-context LLM inference, built on top of Huggingface Transformers and PyTorch. It enables running models like Llama-3.1-8B-Instruct on 100k context using ~$200 consumer GPU with 8GB VRAM. Example performance: ~20 min for the first token, ~17s per subsequent token.

https://github.com/Mega4alik/ollm
TIL: Using SQLModel Asynchronously with FastAPI (and Air) with PostgreSQL

This post explains how to leverage SQLModel with FastAPI and PostgreSQL to enable fully asynchronous database operations, improving scalability and efficiency for concurrent web applications. Key steps include setting up async database engines and sessions, using dependency injection in FastAPI, and aligning everything with non-blocking patterns.

https://daniel.feldroy.com/posts/til-2025-08-using-sqlmodel-asynchronously-with-fastapi-and-air-with-postgresql