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

#376: Every dunder method in a Python Lockbox

Published Tue, Mar 26, 2024, recorded Tue, Mar 26, 2024
Watch this episode on YouTube
Play on YouTube
Watch the live stream replay

About the show

Sponsored by ScoutAPM: pythonbytes.fm/scout

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.

Brian #1: 🤖 On Robots.txt

Michael #2: niquests

  • Requests but with HTTP/3, HTTP/2, Multiplexed Connections, System CAs, Certificate Revocation, DNS over HTTPS / TLS / QUIC or UDP, Async, DNSSEC, and (much) pain removed!
  • Niquests is a simple, yet elegant, HTTP library. It is a drop-in replacement for Requests, which is under feature freeze.
  • See why you should switch: Read about 10 reasons why

Brian #3: Every dunder method in Python

  • Trey Hunner
  • Sure, there’s __repr__(), __str__(), and __init__(), but how about dunder methods for:
    • Equality and hashability
    • Orderability
    • Type conversions and formatting
    • Context managers
    • Containers and collections
    • Callability
    • Arithmetic operators
    • … and so much more … even a cheat sheet.

Michael #4: Lockbox

  • Lockbox is a forward proxy for making third party API calls.
  • Why? Automation or workflow platforms like Zapier and IFTTT allow "webhook" actions for interacting with third party APIs.
  • They require you to provide your third party API keys so they can act on your behalf. You are trusting them to keep your API keys safe, and that they do not misuse them.
  • How Lockbox helps: When a workflow platform needs to make a third party API call on your behalf, it makes a Lockbox API call instead. Lockbox makes the call to the third party API, and returns the result to the workflow platform.

Extras

Brian:

Michael:

Joke: Windows Certified


Want to go deeper? Check our projects