Python Trending Weekly
ISSUE 71

PyPI Should Ditch Its Sponsorship Dependencies

2024-09-28 Season 3

TL;DR

An argument that PyPI should ditch its sponsorship dependence, Tree-sitter and Jedi teaming up for refactoring, Psycopg 3's automatic async-to-sync conversion, and a look inside Meta's Bento.

Articles 12 Projects 12 Media 1
🦄

Articles & Tutorials

× 12
01 The Python Package Index Should Get Rid Of Its Training Wheels kristoff.it

PyPI serves 1.9 billion downloads daily, and according to community estimates, the cost for this massive scale of traffic is around $12 million per year! This is sponsored by Fastly. The article's author proposes reducing costs and breaking free from sponsorship dependency, primarily by addressing the exponential growth of precompiled binary files.

Binaries account for 75% of files on PyPI
02 Case-insensitive string class mathspp.com

Shows how to use the dunder method __new__() to create a case-insensitive string class, implementing equality comparisons, greater/less than comparisons, and adapting other string methods (like upper, startswith, and split).

03 Refactoring Python with Tree-sitter & Jedi jackevans.bearblog.dev

The author wanted to batch-rename a function parameter and explains how to use Tree-Sitter for parsing nodes and Jedi for implementing identifier renaming.

04 Automatic async to sync code conversion psycopg.org

Psycopg 3 supports both sync and async modes. To simplify code and improve maintenance efficiency, the library's author developed a script that automatically converts async code to sync code by parsing the AST, solving compatibility issues between the two modes. The article mainly covers implementation principles and handling of key challenges.

05 Counting Sheeps with Contracts in Python colorsofcode.ghost.io

Code contracts use pre/post conditions to regulate code behavior and ensure it executes as expected. Using a self-developed dbc library, the author explains what "design by contract" is, how to implement it with Python decorators, and the benefits of this programming paradigm.

06 A Retrospective on the Oils Project oilshell.org

Oil is a Python open-source project dedicated to developing a modern bash and creating an entirely new shell language. This article is a recent retrospective by the project's author, explaining why the project has taken so long, including technical challenges and social factors the project has encountered.

07 Taming the beast that is the Django ORM - An introduction davidhang.com

What is ORM (Object-Relational Mapping)? What are its pros and cons? What are the basic operations of Django ORM, and what are the performance optimization tips and common pitfalls?

08 Solution to the puzzle Cat Walk wondrousnet.blogspot.com

Cat Walk is a maze-type programming puzzle. The article analyzes the solution approach and provides a detailed implementation process. (Bonus: The author's blog has other puzzle articles, like solving the "Black and White" puzzle)

Solution to the puzzle Cat Walk
09 Disabling Scheduled Dependency Updates davidism.com

The author maintains many libraries on GitHub and previously used tools like Dependabot and pre-commit.ci to regularly generate update PRs, but the frequent notifications became disruptive. They've now developed the gha-update tool to manually update GitHub Actions workflows.

10 Interactive Mapping with ipyopenlayers blog.jupyter.org

ipyopenlayers integrates the popular JavaScript library OpenLayers into Jupyter Notebooks for creating interactive maps. The article introduces its main features and demonstrates how to use this library to transform geospatial data into dynamic, interactive map visualizations.

11 What is the longest known sequence of numbers that repeats in Pi? sponaugle.com

What's the length of the longest repeating sequence found in π? How much memory and time does it take to find longer repeating sequences? The article uses Python and C to search for the longest repeating sequences in the first several hundred billion digits of pi, yielding some fascinating exploratory data.

12 I learned the language of computer programming in my 50s theguardian.com

An article from The Guardian where the author explains why he started learning programming in his 50s. He tried HTML/CSS/JavaScript but felt disappointed, and eventually fell in love with Python and its community.

🐿️

Projects & Resources

× 12
01 SurfSense: Personal AI Assistant for World Wide Web Surfers github.com

Save everything you see online to your personal knowledge base with powerful search capabilities, chat with your web browsing history, support for local LLMs and self-hosting, featuring advanced RAG technology.

02 peepdb: CLI tool and python library to inspect databases fast github.com

Lightweight CLI tool and Python library for fast, efficient database inspection without writing SQL, supporting MySQL, PostgreSQL, MariaDB, and MongoDB.

03 dante: A zero-setup, easy to use document store for Python github.com

Zero-setup, easy-to-use document database perfect for exploratory programming, prototyping, internal tools, and small simple projects. Built on SQLite, stores Python dictionaries or Pydantic models, supports both sync and async modes.

04 skrub: Prepping tables for machine learning github.com

Provides high-level tools for joining dataframes, encoding columns, and building pipelines, aiming to bridge tabular data sources with machine learning models. (1.2K stars)

05 scientific-visualization-book: An open access book on scientific visualization using python and matplotlib github.com

An open-source book about Matplotlib, including PDF and code example resources. (10.6K stars)

06 minDB: Extremely memory-efficient vector database github.com

An extremely memory-efficient vector database with high recall and low latency. Uses highly compressed search indexes combined with disk reordering.

07 weather_landscape: Visualizing Weather Forecasts Through Landscape Imagery github.com

Visualizes boring weather forecast data intuitively on hand-drawn style landscape images, with animated changes over time.

08 httpdbg: easily debug the HTTP(S) client requests in a Python program github.com

Easily debug HTTP client requests in the browser, viewing headers, cookies, requests, and response data.

09 GetQzonehistory: Retrieve historical posts published on QQ Zone github.com

Retrieves all posts published under an account by fetching QQ Zone's historical message list.

10 Qocker: a user-friendly GUI application for managing Docker containers github.com

A Docker container management tool developed with PyQt5, enabling quick access and start/stop/delete operations for containers, real-time container status updates, supporting Windows, macOS, and Linux.

Qocker: a user-friendly GUI application for managing Docker containers
11 linkding: Self-hosted bookmark manager github.com

A Python-developed self-hosted bookmark manager that uses tags to organize bookmarks, supporting batch editing, Markdown notes, read-later functionality, bookmark sharing, automatic website descriptions, automatic website archiving, bookmark import/export, PWA support, browser extensions, and SSO authentication.

12 wasm2mpy: Compile WebAssembly to native MicroPython modules github.com

Enables code written in statically typed languages to run on MicroPython-based embedded systems (like ESP32, Raspberry Pi Pico, STM32, and nRF52) with near-native performance.

🐢

Podcasts & Videos

× 1
01 Inside Bento: Jupyter Notebooks at Meta engineering.fb.com

This is a Meta tech podcast. Bento is Meta's internal Jupyter Notebook that enhances Jupyter Notebooks with features like version control, collaborative editing, and automatic dependency management.

ESC
↑↓ select · ↵ open175 issues