Skip to main content

High-performance IPv4/IPv6 subnetting calculator, VLSM allocator, and conflict detector.

Project description

NetPulse Subnet Logo

NetPulse Subnet

High-performance, standalone Python library & CLI for IPv4 & IPv6 network calculations, FLSM splitting, and VLSM allocation.

PyPI version Python Versions License


Overview

netpulse-subnet is a standalone network administration tool extracted from the larger NetPulse discovery suite. It helps network engineers programmatically calculate, partition, and optimize IPv4 and IPv6 address spaces natively in Python or directly from the terminal.

Key Features

  • Dual-Stack Support: Robust handling of both IPv4 and 128-bit IPv6 subnets.
  • Subnet Calculator (info): Deep visibility into IP boundaries, subnet masks, wildcard masks, and binary representation.
  • Fixed-Length Subnet Splitter (split): Flawlessly chunk large network blocks based on exact host requirements or target partition counts.
  • Variable-Length Planner (vlsm): Mathematically sort varying host requirements into the tightest fitting CIDR blocks dynamically to eliminate IP wastage.
  • Conflict Detection (validate): Ingest massive lists of legacy subnets and instantly detect routing clashes using a high-speed O(N log N) line-sweep algorithm.
  • REST API Enabled: Run the built-in FastAPI uvicorn wrapper to serve subnet calculation logic dynamically to web dashboards or automation scripts.

Installation

Install globally or locally via pip:

pip install netpulse-subnet

Quick Start (CLI)

# Calculate detailed subnet boundaries for an IP
netpulse-subnet info 192.168.1.50/24

# Optimize and allocate VLSM blocks from a /24 parent network
netpulse-subnet vlsm 192.168.1.0/24 --req "HR=120,Dev=50,Sales=20,Guest=10"

# Validate a list of subnets to ensure no overlap, and calculate free space
netpulse-subnet validate 192.168.1.0/24 192.168.1.128/25 --parent 192.168.1.0/23

Python Integration

Use cleanly typed Pydantic models natively inside your own tools:

from netpulse.subnet.services.subnet import calculate_subnet_info, validate_subnets

# Retrieve detailed boundary models
info = calculate_subnet_info("192.168.1.50", "24")
print(f"Broadcast IP: {info.broadcast_address}")

# Validate for overlaps and free space
valid = validate_subnets(["10.0.0.0/24", "10.0.1.0/24"], parent_network="10.0.0.0/22")
print(f"Conflicts: {valid.has_overlaps}")

Documentation

For full API references, algorithms, and documentation, visit the Official GitHub Repository.

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

netpulse_subnet-0.1.5.tar.gz (655.0 kB view details)

Uploaded Source

Built Distribution

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

netpulse_subnet-0.1.5-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file netpulse_subnet-0.1.5.tar.gz.

File metadata

  • Download URL: netpulse_subnet-0.1.5.tar.gz
  • Upload date:
  • Size: 655.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for netpulse_subnet-0.1.5.tar.gz
Algorithm Hash digest
SHA256 ec8d3c00fe918fa9b2a25110debe9543a2b5206be45201deb2943a5f3fdd868c
MD5 116c64a16649362a6d7128017e4bbcf5
BLAKE2b-256 37083f9882e201376fbefb90da8f89585d699527ddc967cc9167ee3d7567bfab

See more details on using hashes here.

File details

Details for the file netpulse_subnet-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: netpulse_subnet-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for netpulse_subnet-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c158f87b386c86bfcc78c4838d5e23a7142afb7fca5b2b774a6284026197d4b6
MD5 8fd65667c6fb5f1075efacf4bad4111c
BLAKE2b-256 68dc3cacce00b7b6bbe10256a1bbe4519c60aee12fb4ded7677c5cee9a00d900

See more details on using hashes here.

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