/Python

The Best Tools For Python SDK Creation

tl;dr: Some of the most popular OSS options available for creating Python SDKs go head to head with Speakeasy's managed pipeline. Find out what the pros and cons of each approach are.

featured in #420


Writing Python Like It's Rust

- Jakub Beránek tl;dr: “Eventually, I started adopting some concepts from Rust in my Python programs. It basically boils down to two things - using type hints as much as possible, and upholding the good ol’ making illegal states unrepresentable principle. I try to do this both for programs that will be maintained for a while, but also for oneshot utility scripts.”

featured in #416


ugit: DIY Git In Python

tl;dr: ugit is a small implementation of a Git-like version control system. “It's top goal is simplicity and educational value. ugit is implemented in small incremental steps, with each step explained in detail. Hopefully you will be able to read the small steps and slowly build a complete picture of the internals.”

featured in #414


ChatGPT Plugins: Build Your Own In Python!

- James Briggs tl;dr: OpenAI's ChatGPT launched plugins, which can be built by anyone. James demonstrates how to build a plugin using the chatgpt-retrieval-plugin template.

featured in #402


Keeping The Cloudflare API 'All Green' Using Python-Based Testing

- Elie Mitrani tl;dr: This article discusses Scout, an automated system running Python tests verifying the end to end behavior of Cloudflare’s APIs. Scout evaluates APIs in production-like environments, green lights a production deployment and monitors the behavior of APIs in production. This article dives deep into how it operates.

featured in #399


How Virtual Environments Work

- Brett Cannon tl;dr: “There are two parts to virtual environments: their directories and their configuration file. As a running example, I'm going to assume you ran the command py -m venv --without-pip .venv in some directory on a Unix-based OS.”

featured in #398


GPT In 60 Lines Of NumPy

- Jay Mody tl;dr: "In this post, we'll implement a GPT from scratch in just 60 lines of numpy. We'll then load the trained GPT-2 model weights released by OpenAI into our implementation and generate some text.”

featured in #389


Magical Fibonacci Formulae

- Orson Peters tl;dr: "Wow. Somehow the simple expression x/(1−x−x2) contains’ the entire Fibonacci sequence..." Orson explains how.

featured in #388


Python’s “Disappointing” Superpowers

- Luke Plant tl;dr: "I’m worried that a de-facto move away from dynamic stuff in the Python ecosystem, possibly motivated by those who use Python only because they have to, and just want to make it more like the C# or Java they are comfortable with, could leave us with the very worst of all worlds."

featured in #386


Writing A Python SQL Engine From Scratch

- Toby Mao tl;dr: "This post will cover why I went through the effort of creating a Python SQL engine and how a simple query goes from a string to actually transforming data." Toby covers tokenizing, parsing, optimizing, planning and executing.

featured in #381