Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cached-ipaddress

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cached-ipaddress

Cache construction of ipaddress objects

  • 0.8.0
  • PyPI
  • Socket score

Maintainers
1

cached-ipaddress

CI Status Test coverage percentage

Poetry black pre-commit

PyPI Version Supported Python versions License


Source Code: https://github.com/bdraco/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 False

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.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc