Best of Planet PythonSeptember 2025

  1. 1
    Article
    Avatar of planetpythonPlanet Python·33w

    uv cheatsheet

    A comprehensive command reference for uv, the fast Python package manager and project management tool. Covers essential commands for creating projects, managing dependencies, building and publishing packages, working with scripts, managing Python versions, and using tools in isolated environments. Includes practical examples for common workflows like adding/removing dependencies, version bumping, and running scripts with specific Python versions.

  2. 2
    Article
    Avatar of planetpythonPlanet Python·33w

    Python Memory Tricks to Boost Performance

    Comprehensive guide covering practical Python memory optimization techniques including generators for lazy loading, __slots__ for reducing object overhead, weak references for cache management, string interning, smart data structure choices, chunked file processing, and leveraging Python 3.13's mimalloc. Includes ready-to-use code examples and memory profiling tools to help developers reduce RAM usage by 40-60% in large applications.

  3. 3
    Article
    Avatar of planetpythonPlanet Python·30w

    TIL: Loading .env files with uv run

    The uv package manager includes built-in support for loading environment variables from .env files using the --env-file flag with uv run, eliminating the need for python-dotenv dependency. This feature allows developers to specify different environment files for various deployment stages and works seamlessly with frameworks like FastAPI.