Skip to main content

Subnetting and network discovery tool

Project description

NetPulse Subnet Logo

NetPulse Subnet

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

PyPI version Python Versions License: MIT Code style: black


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

✨ Features

  • Subnet Calculator (info): Deep visibility into IP boundaries, subnet masks, wildcard masks, and bitwise binary representation.
  • Fixed-Length Subnet Splitter (split): Flawlessly chunk large network blocks (FLSM) based on exact host requirements or target partition counts.
  • Variable-Length Planner (vlsm): Eliminate IP wastage. Pass an array of varying host requirements and mathematically sort them into the tightest fitting CIDR blocks dynamically.
  • Namespace Packaging: Fully decoupled from netpulse-core. It functions as a lightweight script with minimal dependencies (only pydantic, typer, and fastapi).
  • REST API Enabled: Run the built-in FastAPI uvicorn wrapper to serve subnet calculation logic dynamically to web dashboards or automation scripts.

🚀 Quickstart

Installation

Install globally or locally via pip:

pip install netpulse-subnet

CLI Usage

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

# Split a class A network into equal /10 blocks
netpulse-subnet split 10.0.0.0/8 --subnets 4

# 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"

Python API Integration

Use our cleanly typed Pydantic models and logic natively inside your own tools:

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

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

# Plan VLSM allocation
result = allocate_vlsm("192.168.1.0/24", [{"name": "HR", "hosts": 120}])
print(f"Allocated block: {result.allocations[0].network_cidr}")

📖 Documentation

For in-depth explanations, architectural decisions, and integration examples, dive into the documentation:

  • 🗺️ Usage Guide - Deep dive into CLI and REST API examples.
  • 🐍 API Reference - Documentation for the Python service layer and Pydantic models.
  • 🧠 Design & Algorithms - Read about the mathematical algorithms behind our FLSM and VLSM operations.
  • 🏗️ Architecture - Understand the strict separation of concerns and netpulse implicit namespace.
  • 🧪 Testing - Learn how to run our comprehensive test suite.

🤝 Contributing

We welcome contributions from the community! netpulse-subnet is open-source and maintained actively.

Please read our Contributing Guidelines to understand how to clone the repository, use uv for dependency management, and submit your Pull Requests.

If you've found a bug or have a feature request, feel free to open an issue!

📜 License

Distributed under the MIT License. See LICENSE for more information.

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.2.tar.gz (638.3 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.2-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: netpulse_subnet-0.1.2.tar.gz
  • Upload date:
  • Size: 638.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.2.tar.gz
Algorithm Hash digest
SHA256 9d9ddebd069d4fcb365b7dc5903029a7fd1f16969ce2fdfaddb72b5b9cee2fd3
MD5 5ae239320bb65c1df331e088e89fec92
BLAKE2b-256 34ad8ebf6f20da56fe030ae0debd4868b22750fd9b55a1d1ae39e09b911dd8b2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: netpulse_subnet-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fd511accdea8c3ea45191db8a471c3a28ac51e36c442551812c4eba057a18aaf
MD5 cc6f1fb7a1b99c1550c7ba4669bf1e46
BLAKE2b-256 8b742a966667ad328f05bf2b377d6b12f3be934585104053424cd64477f57263

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