Artwork

A tartalmat a Michael Kennedy and Brian Okken biztosítja. Az összes podcast-tartalmat, beleértve az epizódokat, grafikákat és podcast-leírásokat, közvetlenül a Michael Kennedy and Brian Okken vagy a podcast platform partnere tölti fel és biztosítja. Ha úgy gondolja, hogy valaki az Ön engedélye nélkül használja fel a szerzői joggal védett művét, kövesse az itt leírt folyamatot https://hu.player.fm/legal.
Player FM - Podcast alkalmazás
Lépjen offline állapotba az Player FM alkalmazással!

#378 Python is on the edge

31:24
 
Megosztás
 

Manage episode 411630371 series 1305988
A tartalmat a Michael Kennedy and Brian Okken biztosítja. Az összes podcast-tartalmat, beleértve az epizódokat, grafikákat és podcast-leírásokat, közvetlenül a Michael Kennedy and Brian Okken vagy a podcast platform partnere tölti fel és biztosítja. Ha úgy gondolja, hogy valaki az Ön engedélye nélkül használja fel a szerzői joggal védett művét, kövesse az itt leírt folyamatot https://hu.player.fm/legal.
Topics covered in this episode:
Watch on YouTube
About the show

Sponsored by us! Support our work through:

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am 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.

Brian #1: pacemaker - For controlling time per iteration loop in Python.

  • Brandon Rohrer
  • Good example of a small bit of code made into a small package.
  • With speedups to dependencies, like with uv, for example, I think we’ll see more small projects.
  • Cool stuff
    • Great README, including quirks that need to be understood by users.
      • “If the pacemaker experiences a delay, it will allow faster iterations to try to catch up. Heads up: because of this, any individual iteration might end up being much shorter than suggested by the pacemaker's target rate.”
    • Nice use of time.monotonic()
      • deltas are guaranteed to never go back in time regardless of what adjustments are made to the system clock.
  • Watch out for
    • pip install pacemaker-lite
      • NOT pacemaker
      • pacemaker is taken by a package named PaceMaker with a repo named pace-maker, that hasn’t been updated in 3 years. Not sure if it’s alive.
    • No tests (yet). I’m sure they’re coming. ;)
      • Seriously though, Brandon says this is “a glorified snippet”. And I love the use of packaging to encapsulate shared code. Realistically, small snippet like packages have functionality that’s probably going to be tested by end user code.
      • And even if there are tests, users should test the functionality they are depending on.

Michael #2: PyPI suspends new user registration to block malware campaign

Brian #3: Python Project-Local Virtualenv Management Redux

  • Hynek
  • Concise writeup of how Hynek uses various tools for dealing with environments
  • Covers (paren notes are from Brian)
    • In project .venv directories
    • direnv for handling .envrc files per project (time for me to try this again)
    • uv for pip and pip-compile functionality
    • Installing Python via python.org
    • Using a .python-version-default file (I’ll need to play with this a bit)
      • Works with GH Action setup-python. (ok. that’s cool)
    • Some fish shell scripting
    • Bonus tip on using requires-python in .pyproject.toml and extracting it in GH actions to be able to get the python exe name, and then be able to pass it to Docker and reference it in a Dockerfile. (very cool)

Michael #4: Python Edge Workers at Cloudflare

  • What are edge workers?
  • Based on workers using Pyodide and WebAssembly
  • This new support for Python is different from how Workers have historically supported languages beyond JavaScript — in this case, we have directly integrated a Python implementation into workerd, the open-source Workers runtime.
  • Python Workers can import a subset of popular Python packages including FastAPI, Langchain, numpy
  • Check out the examples repo.

Extras

Michael:

Joke:

  continue reading

385 epizódok

Artwork

#378 Python is on the edge

Python Bytes

1,807 subscribers

published

iconMegosztás
 
Manage episode 411630371 series 1305988
A tartalmat a Michael Kennedy and Brian Okken biztosítja. Az összes podcast-tartalmat, beleértve az epizódokat, grafikákat és podcast-leírásokat, közvetlenül a Michael Kennedy and Brian Okken vagy a podcast platform partnere tölti fel és biztosítja. Ha úgy gondolja, hogy valaki az Ön engedélye nélkül használja fel a szerzői joggal védett művét, kövesse az itt leírt folyamatot https://hu.player.fm/legal.
Topics covered in this episode:
Watch on YouTube
About the show

Sponsored by us! Support our work through:

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 11am 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.

Brian #1: pacemaker - For controlling time per iteration loop in Python.

  • Brandon Rohrer
  • Good example of a small bit of code made into a small package.
  • With speedups to dependencies, like with uv, for example, I think we’ll see more small projects.
  • Cool stuff
    • Great README, including quirks that need to be understood by users.
      • “If the pacemaker experiences a delay, it will allow faster iterations to try to catch up. Heads up: because of this, any individual iteration might end up being much shorter than suggested by the pacemaker's target rate.”
    • Nice use of time.monotonic()
      • deltas are guaranteed to never go back in time regardless of what adjustments are made to the system clock.
  • Watch out for
    • pip install pacemaker-lite
      • NOT pacemaker
      • pacemaker is taken by a package named PaceMaker with a repo named pace-maker, that hasn’t been updated in 3 years. Not sure if it’s alive.
    • No tests (yet). I’m sure they’re coming. ;)
      • Seriously though, Brandon says this is “a glorified snippet”. And I love the use of packaging to encapsulate shared code. Realistically, small snippet like packages have functionality that’s probably going to be tested by end user code.
      • And even if there are tests, users should test the functionality they are depending on.

Michael #2: PyPI suspends new user registration to block malware campaign

Brian #3: Python Project-Local Virtualenv Management Redux

  • Hynek
  • Concise writeup of how Hynek uses various tools for dealing with environments
  • Covers (paren notes are from Brian)
    • In project .venv directories
    • direnv for handling .envrc files per project (time for me to try this again)
    • uv for pip and pip-compile functionality
    • Installing Python via python.org
    • Using a .python-version-default file (I’ll need to play with this a bit)
      • Works with GH Action setup-python. (ok. that’s cool)
    • Some fish shell scripting
    • Bonus tip on using requires-python in .pyproject.toml and extracting it in GH actions to be able to get the python exe name, and then be able to pass it to Docker and reference it in a Dockerfile. (very cool)

Michael #4: Python Edge Workers at Cloudflare

  • What are edge workers?
  • Based on workers using Pyodide and WebAssembly
  • This new support for Python is different from how Workers have historically supported languages beyond JavaScript — in this case, we have directly integrated a Python implementation into workerd, the open-source Workers runtime.
  • Python Workers can import a subset of popular Python packages including FastAPI, Langchain, numpy
  • Check out the examples repo.

Extras

Michael:

Joke:

  continue reading

385 epizódok

Minden epizód

×
 
Loading …

Üdvözlünk a Player FM-nél!

A Player FM lejátszó az internetet böngészi a kiváló minőségű podcastok után, hogy ön élvezhesse azokat. Ez a legjobb podcast-alkalmazás, Androidon, iPhone-on és a weben is működik. Jelentkezzen be az feliratkozások szinkronizálásához az eszközök között.

 

Gyors referencia kézikönyv