Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book

#385: RESTing on Postgres

Published Mon, May 27, 2024, recorded Mon, May 27, 2024
Watch this episode on YouTube
Play on YouTube
Watch the live stream replay

About the show

Sponsored by Mailtrap: pythonbytes.fm/mailtrap

Connect with the hosts

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

  • PostgREST serves a fully RESTful API from any existing PostgreSQL database. It provides a cleaner, more standards-compliant, faster API than you are likely to write from scratch.
  • Speedy
    • First the server is written in Haskell using the Warp HTTP server (aka a compiled language with lightweight threads).
    • Next it delegates as much calculation as possible to the database.
    • Finally it uses the database efficiently with the Hasql library
  • PostgREST handles authentication (via JSON Web Tokens) and delegates authorization to the role information defined in the database. This ensures there is a single declarative source of truth for security.

Brian #2: How Python Asyncio Works: Recreating it from Scratch

  • Jacob Padilla
  • Cool tutorial walking through how async works, including
    • Generators Review
    • The Event Loop
    • Sleeping
    • Yield to Await
    • Await with AsyncIO
  • Another great async resource is:

Michael #3: Bend

  • A massively parallel, high-level programming language.
  • With Bend you can write parallel code for multi-core CPUs/GPUs without being a C/CUDA expert with 10 years of experience.
  • It feels just like Python!
  • No need to deal with the complexity of concurrent programming: locks, mutexes, atomics... any work that can be done in parallel will be done in parallel.

Brian #4: The Smartest Way to Learn Python Regular Expressions

  • Christian Mayer, Zohaib Riaz, and Lukas Rieger
  • Self published ebook on Python Regex that utilizes
    • book form readings, links to video course sections
    • puzzle challenges to complete online
  • It’s a paid resource, but the min is free.

Extras

Brian:

  • Replay - A graphic memoir by Prince of Persia creator Jordan Mechner, recounting his own family story of war, exile and new beginnings.

Michael:

Joke: Shells Scripts


Want to go deeper? Check our projects