DiscoverPython Bytes#445 Auto-activate Python virtual environments for any project
#445 Auto-activate Python virtual environments for any project

#445 Auto-activate Python virtual environments for any project

Update: 2025-08-18
Share

Description

Topics covered in this episode:


Watch on YouTube


About the show



Python Bytes 445



Sponsored by Sentry: pythonbytes.fm/sentry - Python Error and Performance Monitoring



Connect with the hosts





Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too.



Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.



Michael #1: pyx - optimized backend for uv




  • via John Hagen (thanks again)

  • I’ll be interviewing Charlie in 9 days on Talk Python → Sign up (get notified) of the livestream here.

  • Not a PyPI replacement, more of a middleware layer to make it better, faster, stronger.

  • pyx is a paid service, with maybe a free option eventually.



Brian #2: Litestar is worth a look




  • James Bennett

  • Michael brought up Litestar in episode 444 when talking about rewriting TalkPython in Quart

  • James brings up

    • scaling - Litestar is easy to split an app into multiple files

    • Not using pydantic - You can use pydantic with Litestar, but you don’t have to. Maybe attrs is right for you instead.


  • Michael brought up

    • Litestar seems like a “more batteries included” option.

    • Somewhere between FastAPI and Django.




Brian #3: Django remake migrations




  • Suggested by Bruno Alla on BlueSky

  • In response to a migrations topic last week

  • django-remake-migrations is a tool to help you with migrations and the docs do a great job of describing the problem way better than I did last week

  • “The built-in squashmigrations command is great, but it only work on a single app at a time, which means that you need to run it for each app in your project. On a project with enough cross-apps dependencies, it can be tricky to run.”

  • “This command aims at solving this problem, by recreating all the migration files in the whole project, from scratch, and mark them as applied by using the replaces attribute.

  • Also of note

    • The package was created with Copier

    • Michael brought up Copier in 2021 in episode 219

    • It has a nice comparison table with CookieCutter and Yoeman

    • One difference from CookieCutter is yml vs json.

    • I’m actually not a huge fan of handwriting either. But I guess I’d rather hand write yml.

    • So I’m thinking of trying Copier with my future project template needs.




Michael #4: django-chronos




  • Django middleware that shows you how fast your pages load, right in your browser.

  • Displays request timing and query counts for your views and middleware.

  • Times middleware, view, and total per request (CPU and DB).



Extras



Brian:




  • Test & Code 238: So Long, and Thanks for All the Fish

    • after 10 years, this is the goodbye episode




Michael:





Joke: python is better than java

Comments 
00:00
00:00
x

0.5x

0.8x

1.0x

1.25x

1.5x

2.0x

3.0x

Sleep Timer

Off

End of Episode

5 Minutes

10 Minutes

15 Minutes

30 Minutes

45 Minutes

60 Minutes

120 Minutes

#445 Auto-activate Python virtual environments for any project

#445 Auto-activate Python virtual environments for any project

Michael Kennedy and Brian Okken