Type Check Your Python Codebase 15x Faster with Pyrefly
Plus turn Python into C speed with one decorator
Grab your coffee. Here are this week’s highlights.
📅 Today’s Picks
Codon: One Decorator to Turn Python into C Speed
Problem
Slow Python functions in large codebases are painful to optimize. You might try Numba or Cython, but Numba only works for numerical code with NumPy arrays.
You might try Cython, but it needs .pyx files, variable type annotations, and build setup. That’s hours of refactoring before you see any speedup.
Solution
Codon solves this with a single @codon.jit decorator that compiles your Python to machine code.
Key benefits:
Works on any Python code, not just NumPy arrays
No type annotations required since types are inferred automatically
Compiled functions are cached for instant repeated calls
Zero code changes beyond adding the decorator
The example below shows the real performance:
Pure Python: 0.240s
Codon first call: 0.324s (one-time compilation)
Codon cached calls: 0.006s (37x faster)
🧪 Run code
Datadog: Trace Bad Data from Dashboard to Root Cause in One View (Sponsored)
Problem
If your pipeline isn’t connected end to end, debugging means jumping between tools and manually tracing the issue. It’s slow and error-prone.
Solution
Instead of jumping between tools, Datadog Data Observability gives you one connected view from ingestion to dashboards.
It does this through:
Quality Monitoring: catches anomalies like missing rows or stale data automatically
Jobs Monitoring: gives visibility into Spark and Airflow runs, including failures and cost
Data and code lineage: traces problems upstream to the source and downstream to every affected dashboard, model, and report
Type Check Your Python Codebase 15x Faster with Pyrefly
Problem
Tools like MyPy and Pyright process files sequentially, so larger codebases lead to longer wait times.
Solution
Pyrefly, Meta’s Rust-based type checker, runs checks in parallel, keeping performance nearly constant as your codebase grows.
Key features:
Re-checks only changed modules for faster incremental runs
Automatically infers types for variables and return values
On the PyTorch codebase, Pyrefly completes a full check in 2.4 seconds, about 15x faster than Pyright and 20x faster than MyPy.
📚 Latest Deep Dives
browser-use: Turn Plain English Prompts into Working Browser Automation
Traditional tools like Playwright rely on CSS selectors, tightly coupling your scraper to a site’s HTML. When the site changes, everything breaks and needs to be rewritten.
browser-use takes a different approach. You describe the goal in plain English, and an LLM decides what to click, type, and extract.
In this article, I tested browser-use on two real tasks:
Finding AI stories on Hacker News and synthesizing themes
Scraping Newegg for gaming laptops with specific constraints
I share the actual outputs, cost per run, and an honest breakdown of what worked and what didn’t, so you can decide if it fits your use case.
☕️ Weekly Finds
bandit [Code Quality] - A security linter that scans Python code for common vulnerabilities by building and analyzing abstract syntax trees.
scalene [Code Quality] - High-performance CPU, GPU, and memory profiler for Python with AI-powered optimization proposals.
vulture [Code Quality] - Finds unused code in Python programs, including dead functions, classes, variables, and unreachable code blocks.
💬 Rate Your Experience
How would you rate your newsletter experience? Share your feedback →
🔍 Explore More on CodeCut
Tool Selector - Discover 70+ Python tools for AI and data science
Production Ready Data Science - A practical book for taking projects from prototype to production



