Debian Codegraph @

/

debian cached-ipaddress 1.1.2-1debian python3-cached-ipaddress python cached-ipaddress 1.1.2 debianinijavascriptjsonmakefilemarkdownpythonshelltomlxmlyaml 34 files · 239 symbols
View dependency graph

Depends on

README (full)

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

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):

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits

This package was created with Copier and the browniebroke/pypackage-template project template.

dir .github/
dir .idea/
dir debian/
dir src/
dir templates/
dir tests/
file .all-contributorsrc
file .copier-answers.yml
file .editorconfig
file .gitignore
file .gitpod.yml
file .pre-commit-config.yaml
file CHANGELOG.md
file CONTRIBUTING.md
file LICENSE
file README.md
file build_ext.py
file commitlint.config.mjs
file poetry.lock
file pyproject.toml
file renovate.json