PythonHub
2.38K subscribers
2.35K photos
49K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
Using Python to Measure Immigration Trends

This post uses Python and the American Community Survey (ACS) data to analyze immigration trends in Great Neck, NY, revealing a shift from Iranian to Chinese immigrants and a significant increase in the "Asian alone" population between 2009 and 2023. The author provides code for others to analyze immigration in their own hometowns.

https://arilamstein.com/blog/2025/03/04/using-python-to-measure-immigration-trends/
Creating static map images with OpenStreetMap, Web Mercator, and Pillow

This post details how to create static maps with points overlaid using OpenStreetMap tiles and Pillow, bypassing complex data visualization libraries for a simpler, more understandable approach. It provides Python code for downloading map tiles and converting lat/lon coordinates to pixel positions for drawing points on the map.

https://alexwlchan.net/2025/static-maps/
ShortsMaker

ShortsMaker is a Python package designed to facilitate the creation of engaging short videos or social media clips. It leverages a variety of external services and libraries to streamline the process of generating, processing, and uploading short content.

https://github.com/rajathjn/shorts_maker
Here’s how I use LLMs to help me write code

This post shares practical tips for using LLMs to write code effectively, emphasizing that it's not always easy and requires managing context, setting expectations, and thorough testing. The author suggests thinking of LLMs as over-confident, lightning-fast pair programming assistants and provides a detailed example of building a tool with Claude Code.

https://simonwillison.net/2025/Mar/11/using-llms-for-code/
Isolating Python and Jupyter using firejail

This article outlines a method for running isolated Python processes using Firejail, ensuring they can only access a specified project directory and limiting network access. The setup involves creating a virtual environment, installing packages with temporary internet access, and running Jupyter Notebooks via a Unix socket to maintain isolation.

https://bnikolic.co.uk/blog/python/firejail/2025/03/05/python-isolated
ASK HN: How to engineer a JavaScript to Python migration?

https://news.ycombinator.com/item?id=43360552
Flet - Desktop & Mobile apps in Python!

This video tutorial demonstrates how to use the Flet framework in Python to build cross-platform mobile and desktop apps, even without prior front-end development experience. It walks through creating a simple quiz application, explaining how to structure the UI with Flet controls and handle user interactions.

https://www.youtube.com/watch?v=4aiNStwq8oU
👍2👏1
A Very (!) Early Play With Astral's Red Knot Static Type Checker

Astral is developing a new Python type checker, aiming to be significantly faster than mypy. The author explores building and running it, finding it promisingly fast but still a work in progress with some type checking discrepancies.

https://jurasofish.github.io/a-very-early-play-with-astrals-red-knot-static-type-checker.html
Python’s ‘shelve’ is really useful for LLM debugging

Use python’s shelve as a quick and easy, persistent key-value store for LLM workflows.

https://www.jerpint.io/blog/python-shelve-as-cache/