Metadata-Version: 2.4 Name: cached-ipaddress Version: 1.1.2 Summary: Cache construction of ipaddress objects License-Expression: MIT License-File: LICENSE Author: J. Nick Koston Author-email: nick@koston.org Requires-Python: >=3.9 Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: Natural Language :: English Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 Classifier: Programming Language :: Python :: 3.13 Classifier: Programming Language :: Python :: 3.14 Classifier: Topic :: Software Development :: Libraries Requires-Dist: propcache (>=0.0.0) Project-URL: Bug Tracker, https://github.com/bluetooth-devices/cached-ipaddress/issues Project-URL: Changelog, https://github.com/bluetooth-devices/cached-ipaddress/blob/main/CHANGELOG.md Project-URL: Repository, https://github.com/bluetooth-devices/cached-ipaddress Description-Content-Type: text/markdown # cached-ipaddress

CI Status Test coverage percentage

Poetry black pre-commit

PyPI Version Supported Python versions License

--- **Source Code**: https://github.com/bluetooth-devices/cached-ipaddress --- Cache construction of ipaddress objects ## Design This module keeps a cache of IPAddress objects and caches the properties on them. It it useful when you frequently see the same ip addresses over and over and do not want to pay the overhead of constructing IPAddress objects over and over or checking their properties. ## Installation Install this via pip (or your favourite package manager): `pip install cached-ipaddress` ## Usage ```python from cached_ipaddress import cached_ip_addresses ip = cached_ip_addresses("127.0.0.1") assert ip.is_loopback is True invalid = cached_ip_addresses("invalid") assert invalid is None ``` ## Contributors ✨ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! ## Credits This package was created with [Copier](https://copier.readthedocs.io/) and the [browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template) project template.