{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/4"}],"enrichment":{"capability":"A fast C-based LRU (Least Recently Used) dict container that evicts the oldest items when a fixed size limit is exceeded, with dict-like access and optional eviction callbacks.","skillfed_tags":["caching","memory-bounded","c-extension"],"use_cases":["Build a bounded HTTP response cache that automatically discards stale entries when memory pressure rises.","Implement a session store with a fixed maximum number of concurrent users, evicting idle sessions automatically.","Cache expensive database query results with a memory ceiling, ensuring the cache never grows unbounded.","Speed up repeated computations in data processing pipelines by caching intermediate results with predictable memory use.","Create a connection pool or resource manager that limits concurrent allocations and recycles the least-used resources."],"what_it_does":"lru-dict is a fixed-capacity dictionary-like container implemented in C that automatically evicts the least recently used item when the size limit is exceeded. It provides dict-like access patterns (get, set, delete, iteration) while maintaining insertion and access order, and supports optional callbacks when items are evicted. The main use case is building efficient LRU caches where you need predictable memory bounds and fast lookups without the overhead of pure-Python implementations.\n\nThe package trades ease of installation (requires a C compiler or platform-specific wheel) for speed and memory efficiency. It supports runtime capacity changes, introspection of MRU/LRU items, and statistics gathering. With no runtime dependencies and support for Python 3.9 through 3.14, it integrates into most modern Python projects; the aging maintenance status and search for a lead maintainer are the main caveats.","worth_installing":"Yes, if you need a fast, bounded cache with predictable memory use and can tolerate a C extension dependency. The MIT license, zero runtime dependencies, and broad platform support make it low-risk. However, the aging maintenance status (285 days since last release, seeking a lead maintainer) means you should verify the project's stability for your use case and be prepared to fork or switch if critical bugs emerge. For most new projects, consider whether a pure-Python alternative or functools.lru_cache suffices first."},"id":"lru-dict","links":{"html":"https://skillfed.io/packages/lru-dict","md":"https://skillfed.io/packages/lru-dict.md","pypi":"https://pypi.org/project/lru-dict/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-11-02","license_spdx":"MIT","license_treatment":"permissive","name":"lru-dict","python_support":"supports_current","summary":"An Dict like LRU container."},"popularity":{"monthly_downloads":5871723,"position":2019,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.4.1"}
