{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/8"}],"enrichment":{"capability":"ExpiringDict is a Python dictionary that automatically removes keys after a specified time-to-live (TTL) expires, supporting both class-level and per-key TTL configuration for building auto-expiring caches.","skillfed_tags":["caching","ttl","auto-expiring"],"use_cases":["Session storage that automatically clears old sessions after a timeout period","Rate-limiting buckets that reset after a fixed time window","Temporary cache for API responses that should refresh after a TTL","In-memory job queues where tasks expire if not processed within a deadline","Transient request deduplication that forgets duplicate keys after a time window"],"what_it_does":"ExpiringDict wraps Python's built-in dict to add automatic key expiration based on a time-to-live (TTL) value. You can set a default TTL at the class level so all keys expire after that duration, or assign individual TTLs to specific keys using the ttl() method for fine-grained control. Keys that have exceeded their TTL are no longer accessible via membership tests or lookups.\n\nThe package depends on sortedcontainers to manage the expiration timeline efficiently. It's designed for caching scenarios where you want temporary storage without manual cleanup\u2014common in session management, rate-limiting, or transient data buffering. The aging maintenance status and lack of a documented Python version requirement suggest it's a stable but minimal project.","worth_installing":"Yes, if you need a lightweight, zero-configuration TTL dictionary for simple caching. The low install friction, permissive license, and recent maintenance make it a safe choice for projects that don't require advanced cache features. However, verify thread-safety and expiration semantics for your specific use case before relying on it in production."},"id":"expiring-dict","links":{"html":"https://skillfed.io/packages/expiring-dict","md":"https://skillfed.io/packages/expiring-dict.md","pypi":"https://pypi.org/project/expiring-dict/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-02-28","license_spdx":null,"license_treatment":"permissive","name":"expiring-dict","python_support":"unspecified","summary":"Python dict with TTL support for auto-expiring caches"},"popularity":{"monthly_downloads":185521,"position":10009,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.1.2"}
