Python Trending Weekly
ISSUE 77

Is Python Dependency Management a Dumpster Fire?

2024-11-17 Season 3

TL;DR

Python dependency management gets called a dumpster fire in a fine-grained look at inter-project bloat, PyPI rolls out a new generation of attestations, and PyPIM executes code straight in RAM.

Articles 12 Projects 12 Discussions 2
🦄

Articles & Tutorials

× 12
01 Python Dependency Management is a Dumpster Fire nielscautaerts.xyz

This article dives into the complexity of Python dependency management and how projects can easily catch "fire" as they grow and evolve. It shares numerous techniques, tools, and best practices to improve "fire safety," analyzes the pros and cons of different tools, and provides usage recommendations for various scenarios.

02 The Bloat of Python: A Fine-Grained Analysis of Inter-Project Dependencies dl.acm.org

A paper from the Association for Computing Machinery (ACM) that analyzes the source code of 1,302 popular Python open-source projects and their 3,232 transitive dependencies. It builds a fine-grained project dependency graph, performs reachability analysis, and discovers that over 50% of dependencies are bloated.

03 Sharing My Django Project Template david.guillot.me

The author shares a Django project template based on uv and just, covering recommended directory structures, configuration management, environment variables and secrets management, web UI, deployment, and maintenance.

04 Avoiding Counting in Django Pagination testdriven.io

Django's default Paginator relies on COUNT(*) queries to calculate page numbers, which can be time-consuming. This article explains how to implement custom paginators to improve pagination API query performance. The example demonstrated improves from 855ms to 12ms.

05 You Should Probably Pay Attention to Tokenizers cybernetist.com

When building AI applications, text needs to be tokenized. The author discovered that tokenizer selection and optimization are crucial for RAG effectiveness. The article discusses different tokenizer types (word-based, character-based, and subword) and their impact on model performance.

06 Pythonic Emptiness Checking blog.codingconfessions.com

PEP-8 recommends checking if a list is empty using "if seq" rather than "if len(seq)." Some argue the first method is ambiguous. This article refutes that viewpoint, advocating for meaningful variable names, type hints, clear function names, and docstrings to improve code readability and reduce ambiguity.

07 Attestations: A New Generation of Signatures on PyPI blog.trailofbits.com

PyPI introduces a security feature from PEP-740 specification: digital attestations. It improves upon traditional PGP signatures by enhancing key availability, index verifiability, cryptographic strength, and provenance attributes.

08 PyPIM: New Method to Execute Python Code Directly in RAM techspot.com

Israeli researchers developed a new software "platform" that converts easy-to-read Python instructions into low-level machine code and executes it directly in RAM without going through the CPU. This new Processing-In-Memory (PIM) architecture significantly improves code performance.

09 A Practical Example of the Pipeline Pattern in Python pybit.es

The Pipeline pattern, also known as the Chain of Command pattern. This article presents an example using functools.reduce, partial functions, and the BeautifulSoup library to parse HTML content, explaining the usage and benefits of this pattern.

10 Zero-Downtime Django Deployments with Multistep Database Changes johnnymetz.com

Blue-green deployment is a common strategy to prevent service downtime during deployments. This article explores what blue-green deployment is, why modifying databases during blue-green deployment can be tricky, and how to handle common database changes using a Django project as an example.

11 Netflix's Investigation of a Workbench UI Latency Issue netflixtechblog.com

Workbench is a remote development workspace launched by Netflix that recently experienced slow and unresponsive JupyterLab UI issues. This article reviews the detailed troubleshooting process, from UI debugging all the way down to the Linux kernel.

12 ML in Go with a Python Sidecar eli.thegreenplace.net

How to use machine learning models in Go projects? This article covers several approaches, including using existing LLM APIs, running open-source models locally, and integrating trained models through a Python sidecar pattern. The article focuses on explaining and demonstrating the last approach.

ML in Go with a Python Sidecar
🐿️

Projects & Resources

× 12
01 Box: Access Nested Dictionaries with Advanced Dot Notation github.com

Transform inaccessible nested dictionaries into accessible attributes, allowing you to use dot notation to access dictionary elements, making code more concise and readable. (2.6K stars)

02 dendrite-python-sdk: Build Web AI Agents that Browse Like Humans github.com

Supports element interaction, structured data extraction, authentication, file upload/download, and browsing without being blocked.

03 prints_charming: Enhanced Terminal Printing with Styles and Colors github.com

Features colorful terminal printing, text styling (background colors, bold, underline, etc.), custom styles, border and table creation, and intelligent defaults.

04 weft: Vim-like Terminal Reader that Can Chat with Books github.com

Read epub ebooks in the terminal using Vim-like commands, with features to chat with current text, generate summaries, and text-to-speech functionality.

05 PiML-Toolbox: Python Interpretable Machine Learning Toolbox github.com

A new Python toolbox for interpretable machine learning model development and validation. Through low-code interfaces and high-code APIs, it supports an increasing number of inherently interpretable ML models. (1.2K stars)

06 PDF-Extract-Kit: High-Quality PDF Content Extraction github.com

Extract high-quality content from complex and diverse PDF documents, integrating leading document parsing models, high-quality parsing across different documents, modular design, and providing diverse and comprehensive PDF evaluation benchmarks. (5.6K stars)

07 VideoLingo: Netflix-Level Subtitle Cutting, Translation, Alignment, and Dubbing github.com

A one-stop video translation and localization dubbing tool that generates Netflix-level high-quality subtitles with one click, eliminating stiff machine translations and multi-line subtitles, while adding high-quality dubbing to let knowledge cross language barriers worldwide. (6.3K stars)

08 htmy: Asynchronous, Pure Python Rendering Engine github.com

An async-first pure Python rendering engine with React-like context support, built-in baseline HTML tags, Markdown support, JSON-based internationalization, and easy customization of everything.

09 website-hot-hub: Hot Rankings from 36Kr, Bilibili, Douyin, Juejin, and WeChat Reading github.com

Automatically scrapes data hourly from multiple platforms' hot rankings, archived daily, with data from October 25, 2023 to present.

10 watermark-anything: Add Watermarks to Anything github.com

Implementation and pre-trained models for the Watermark Anything paper, supporting embedding multiple localized watermarks in images.

11 models: Advanced Open-Source Video Generation Models github.com

Very advanced video generation models, completely open-source, with high-fidelity motion and strong prompt adherence. (2K stars)

12 deepface: Lightweight Face Recognition and Facial Attribute Analysis github.com

Not only recognizes faces but also analyzes person attributes (age, gender, emotion, race). Face recognition accuracy reaches 97.53%. (14.7K stars)

deepface: Lightweight Face Recognition and Facial Attribute Analysis
🥂

Discussions & Questions

× 2
01 State of the Art Python in 2024 reddit.com

What "defaults" are currently being promoted in Python teams?

02 Why Don't Some Python Beginner Books Teach class, yield, self and Similar Concepts? v2ex.com

Why do some highly-rated beginner books not teach these things? Is it problematic not to learn them?

ESC
↑↓ select · ↵ open175 issues