PythonHub
2.38K subscribers
2.35K photos
49K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
Operating Inside the Interpreted: Offensive Python

The post discusses how Python on Windows (often preinstalled via the Microsoft Store) can be used as a surprisingly effective tool for offensive security and malware operations, thanks to its rich standard library, isolated package management, and low-profile presence in corporate environments. It outlines methods such as malware delivery, offline package installation, and leveraging cty...

https://trustedsec.com/blog/operating-inside-the-interpreted-offensive-python
The Step-by-Step Guide to Python Packaging Tools 2025

A future-ready guide comparing Python packaging tools like uv, Poetry, Hatch, and PDM—perfect for modern developers and teams.

https://www.datumlabs.io/resources/the-step-by-step-guide-to-python-packaging-tools-2025?utm_source=pythonhub&utm_medium=blog&utm_campaign=blog-published
Inheritance over composition, sometimes

Last time, we built a hybrid concurrent.futures executor using inheritance. Today, we're building it again (twice!) using composition and functions only, to figure out which way is better and why.

https://death.andgravity.com/over-composition
Using Lean like an External SMT Solver from Python

The author demonstrates using Lean as an external SMT solver by translating proof goals into SMT queries and reconstructing the results back into valid Lean proofs. He builds a lightweight Python workflow that integrates Lean and SMT solvers seamlessly, enabling automated, proof-generating tactics within Lean.

https://www.philipzucker.com/lean_smt/
Escaping Contravariance Hell

The post explains how Python's type checkers reject certain Callable and Protocol overrides due to contravariant parameter rules, using a vegetable-peeler analogy to clarify the concept. It then shows how to resolve these issues safely with generics like TypeVar or PEP 695 patterns, avoiding the need to fall back on Any.

https://labs.quansight.org/blog/escaping-contravariance-hell
Python and Make in 2025

The post recommends using GNU Make with Python projects for automation entrypoints, preferring uv for fast interpreter/venv setup and delegating complex logic to Python task runners, keeping the Makefile minimal and focused.

https://onebadbit.com/posts/2025/07/python-and-make-in-2025/
1
PyTorch in One Hour: From Tensors to Training Neural Networks on Multiple GPUs

This tutorial offers a fast-paced introduction to PyTorch, covering key topics like tensors, GPU training, and backpropagation in about one hour. Its goal is to help you quickly start building and training deep neural networks, including large language models.

https://sebastianraschka.com/teaching/pytorch-1h/
Python Gotcha: Reusing Generators Returns Nothing

Reusing a Python generator after it’s been consumed yields no results, because generators maintain state and don’t reset once iterated. The fix is straightforward: call the generator function again to produce a fresh iterator before reusing it.<br>

https://andrewwegner.com/python-gotcha-reusing-generator-returns-nothing.html