New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ipcalc

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipcalc

IP subnet calculator

  • 1.99.0
  • PyPI
  • Socket score

Maintainers
1

About

This module allows you to perform IP subnet calculations, there is support for both IPv4 and IPv6 CIDR notation.

Example Usage

::

>>> import ipcalc
>>> for x in ipcalc.Network('172.16.42.0/30'):
...     print str(x)
...
172.16.42.1
172.16.42.2
>>> subnet = ipcalc.Network('2001:beef:babe::/48')
>>> print str(subnet.network())
2001:beef:babe:0000:0000:0000:0000:0000
>>> print str(subnet.netmask())
ffff:ffff:ffff:0000:0000:0000:0000:0000
>>> '192.168.42.23' in Network('192.168.42.0/24')
True
>>> long(IP('fe80::213:ceff:fee8:c937'))
338288524927261089654168587652869703991L

Bugs/Features

You can issue a ticket in GitHub: https://github.com/tehmaze/ipcalc/issues

Documentation

Documentation is available from http://ipcalc.rtfd.org/

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