Skip to main content

Cache construction of ipaddress objects

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cached_ipaddress-1.1.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cached_ipaddress-1.1.2-cp314-cp314-manylinux_2_41_x86_64.whl (44.5 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.41+ x86-64

File details

Details for the file cached_ipaddress-1.1.2.tar.gz.

File metadata

  • Download URL: cached_ipaddress-1.1.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cached_ipaddress-1.1.2.tar.gz
Algorithm Hash digest
SHA256 232f62f768a2531e3d64e661eb2e484b52954ceb8d2b04ad0d2317f52ce25108
MD5 d4e5fd83f714c5465e2435f2dee83888
BLAKE2b-256 095fa5f4c350307c00fa23322acd24ad8f6a46929a7cfd321e2cc3870f689524

See more details on using hashes here.

Provenance

The following attestation bundles were made for cached_ipaddress-1.1.2.tar.gz:

Publisher: ci.yml on Bluetooth-Devices/cached-ipaddress

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cached_ipaddress-1.1.2-cp314-cp314-manylinux_2_41_x86_64.whl.

File metadata

File hashes

Hashes for cached_ipaddress-1.1.2-cp314-cp314-manylinux_2_41_x86_64.whl
Algorithm Hash digest
SHA256 5319b02ca66356ff9e7050e346e16f8de2279ef20b6fe512a7086cb85b17d338
MD5 ba8488ef226ad1710110381196dd0e91
BLAKE2b-256 94d8608aee31ec66ddbf7b5c8b10ff6ccf78bad1b9287fff59d93c15c0d08b6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cached_ipaddress-1.1.2-cp314-cp314-manylinux_2_41_x86_64.whl:

Publisher: ci.yml on Bluetooth-Devices/cached-ipaddress

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page