--- id: cached-ipaddress version: "1.1.2" license: MIT license_treatment: permissive maintenance: active --- # cached-ipaddress — Cache construction of ipaddress objects License: permissive · Maintenance: active · Downloads: 94.6K/mo ## What it is and what it does cached-ipaddress wraps Python's standard ipaddress module to maintain an in-memory cache of IP address objects and their computed properties. When you call cached_ip_addresses() with a string, it returns a cached IPAddress object if one already exists for that address, or constructs and caches a new one. This avoids the overhead of repeatedly parsing and constructing the same IP addresses—useful in network monitoring, device discovery, or any scenario where you process many IP addresses with high repetition. The package depends on propcache for efficient property caching on the underlying objects. It returns None for invalid IP address strings rather than raising an exception, making it safe to use in defensive code paths. The module is lightweight and designed as a drop-in optimization for applications that already use the ipaddress module. Use it for: - Network monitoring systems that repeatedly check properties of the same source or destination IPs. - IoT or Bluetooth device discovery where you encounter the same device addresses across multiple scan cycles. - Log parsing or traffic analysis where IP addresses repeat frequently and you need fast property checks. - Caching layers in network security tools that classify or filter IPs by type (loopback, private, multicast, etc.). - High-frequency network telemetry collection where the same peer addresses appear in many packets. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Caches IP address object construction and property lookups to avoid repeated overhead when the same IP addresses are encountered multiple times. Yes, if your application repeatedly processes the same IP addresses and profiles show ipaddress object construction as a bottleneck. The permissive MIT license and active maintenance make it low-risk. Install friction is moderate due to the compiled propcache dependency, but the wheel is available for modern Python versions. Skip it if you process mostly unique IPs or don't measure ipaddress overhead as significant. ## Install pip install cached-ipaddress uv add cached-ipaddress poetry add cached-ipaddress ## Installing cached-ipaddress Before you install: Medium install friction due to a compiled wheel dependency (propcache). Active maintenance with a recent release; last commit was 2026-08-10. Supports Python 3.9 through 3.14. License in practice: MIT license permits commercial and private use with minimal restrictions—you may use, modify, and distribute this package freely as long as you include the license notice. Quickstart: from cached_ipaddress import cached_ip_addresses ip = cached_ip_addresses("127.0.0.1") if ip: print(ip.is_loopback) # True Requires Python 3.9 or later. Verify before relying: - Whether the cache is thread-safe or suitable for concurrent access patterns. - Memory footprint and eviction strategy for the internal cache under high-volume IP address streams. - Performance improvement magnitude compared to direct ipaddress module use in typical workloads. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 94.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags ip address caching, cached ipaddress objects, ip address performance, ipaddress object cache, repeated ip lookup optimization, network address caching, ip property cache, caching, networking, performance-optimization [View on SkillFed](https://skillfed.io/packages/cached-ipaddress) · [View on PyPI](https://pypi.org/project/cached-ipaddress/)