#376: Every dunder method in a Python Lockbox
Published Tue, Mar 26, 2024,
recorded Tue, Mar 26, 2024
About the show
Sponsored by ScoutAPM: pythonbytes.fm/scout
Connect with the hosts
- Michael: @mkennedy@fosstodon.org
- Brian: @brianokken@fosstodon.org
- Show: @pythonbytes@fosstodon.org
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
- Jeff Triplett
- “In theory, this file helps control what search engines and AI scrapers are allowed to visit, but I need more confidence in its effectiveness in the post-AI apocalyptic world.”
- Resources to get started
- Podcast questions:
- Should content creators block AI from our work?
- Should’t we set up a standard way to do this?
- I still haven’t found a way to block GitHub repositories.
- Is there a way?
- Licensing is one thing (not easy), but I don’t think any bots respect any protocol for repos.
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:
- Django: Join the community on Mastodon - Adam Johnson
- No maintenance intended - Sent in from Kim van Wyk
Michael:
- US sues Apple
- PyPI Support Specialist job
- VS Code AMA, please submit your question here
- PyData Eindhoven 2024 has a date and open CFP
Joke: Windows Certified