PyTexas 2026 Training Day

I always learn something at the PyTexas training day. This year, I learned how little I actually know about Python imports. Heather Crawford ran the morning session on sys.path, modules, and packages. I have been writing Python long enough to fix ImportError messages without understanding them. The mental model she gave us helped me make sense of it. Find, then bind. Everything flows from those two steps. I had to redo my imports multiple times during the lab exercises. I still need my notes to walk someone through the whole picture, but I have a map now where I had guesses before. ...

April 17, 2026 · 2 min · Jamal Hansen
I Am Reading Fluent Python

I Am Reading Fluent Python

A couple weekends ago, I was lucky enough to attend PyTexas 2025. It’s a great regional conference that is a great mix of world class speakers and cozy relaxed atmosphere. It’s in spring, on the banks of Lady Bird Lake in Austin, Texas. It is a wonderful event. At the conference, the organizers periodically raffled off items from a ‘prize trough’. The prize trough was a wagon filled with technical books. There were many great titles in there including The Pragmatic Programmer, Automate the Boring Stuff with Python, and The Missing README, among others. ...

April 21, 2025 · 2 min · Jamal Hansen

Add External Dependencies to Python Scripts with uv

Ever wanted to share a Python script that uses external packages without making the recipient set up a virtual environment? With uv, you can embed dependencies directly in the script. The Command uv add --script example.py 'requests<3' 'rich' This adds inline metadata to your script: # /// script # dependencies = [ # "requests<3", # "rich", # ] # /// import requests from rich.pretty import pprint resp = requests.get("https://peps.python.org/api/peps.json") data = resp.json() pprint([(k, v["title"]) for k, v in data.items()][:10]) Running It Anyone with uv installed can now run the script directly: ...

April 19, 2025 · 1 min · Jamal Hansen