Subnetting and network discovery tool
Project description
NetPulse Subnet
High-performance, standalone Python library & CLI for IPv4 network calculations, FLSM splitting, and VLSM allocation.
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 (onlypydantic,typer, andfastapi). - 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
netpulseimplicit 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netpulse_subnet-0.1.1.tar.gz.
File metadata
- Download URL: netpulse_subnet-0.1.1.tar.gz
- Upload date:
- Size: 558.1 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f4ecaa8322e0028193d39b1aa1b46cb178343c790dceb912cfa8e847e79b486
|
|
| MD5 |
a28698988aa666e84b3faa3c1b8685d0
|
|
| BLAKE2b-256 |
00a2a5d02fb07ae2d9d295935cdd34b4c74c69ca5d0a910045cd990514663193
|
File details
Details for the file netpulse_subnet-0.1.1-py3-none-any.whl.
File metadata
- Download URL: netpulse_subnet-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.7 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
733a5477444e7ebf31ff55127a4faaebb20c343e8914d301bc747bcd851c85f9
|
|
| MD5 |
42e5cdd60093c3f1f982e61a159e5d7e
|
|
| BLAKE2b-256 |
165cee78b1f047b340897d17dcf0d9235501a8020c54daba955552479797d238
|