Skip to main content

High-speed network discovery and drift analysis engine

Project description

NetPulse Discovery Logo

NetPulse Discovery

Python Rust Build Status

NetPulse Discovery is a high-performance, asynchronous network mapping and drift-analysis engine. By offloading packet-level networking to a compiled Rust core, it achieves near wire-speed execution while maintaining a flexible, developer-friendly Python API.

🚀 Key Features

High-Performance Networking (Rust Core)

NetPulse operates at near wire-speed, utilizing a custom Rust core (_engine) layered with PyO3. It broadcasts custom Layer 2 ARP frames and Layer 3 ICMP Echo sweeps using raw datalink sockets. Features include OS Fingerprinting via TCP banners and TTL extraction, native Traceroutes, and Passive Topology Sniffing (CDP/LLDP).

Cloud Native & Developer Ecosystem

Ready for modern infrastructure! Spin up the API daemon with netpulse-discovery serve to instantly access a full REST API, a Strawberry GraphQL interface (/graphql) for complex topological querying, and a Prometheus Metrics exporter (/metrics) built right in. You can also inject real-time Python plugins directly into the discovery engine.

  • Asynchronous Port Scanning: Native asyncio TCP connect scanner that can check hundreds of ports across multiple devices concurrently.
  • Drift Detection: Built-in intelligence to compare historical scans and calculate exact topological drift (e.g., "Host 192.168.1.5 went offline").
  • MAC Vendor Resolution: Automatically translates hardware MAC addresses into human-readable manufacturer names.
  • Standalone API & CLI: Usable as a Python library, a Typer-powered CLI, or a FastAPI REST microservice.

📦 Installation

NetPulse Discovery is distributed as a pre-compiled binary wheel. It is entirely self-sufficient and requires no Rust compiler or external dependencies to install!

pip install netpulse-discovery

⚡ Quickstart

As a CLI Tool

The standalone CLI returns structured JSON output perfect for piping into jq or other tools. You can also export directly to files!

[!IMPORTANT] Multiplatform Execution: Low-level network scanning requires elevated privileges.

  • Linux / macOS: Prefix your commands with sudo
  • Windows: Open an Administrator Command Prompt or PowerShell session to execute.
# Scan a network
sudo netpulse-discovery scan 192.168.1.0/24 --timeout 500

# Export results directly to a file
sudo netpulse-discovery scan 192.168.1.0/24 --output results.json
sudo netpulse-discovery scan 192.168.1.0/24 --output results.yaml
sudo netpulse-discovery scan 192.168.1.0/24 --output results.txt

# Calculate Network Drift from two exported JSON files (No sudo required)
netpulse-discovery drift old_results.json results.json --output drift_report.yaml

# Run Continuous Daemon Mode with Webhook Alerting
sudo netpulse-discovery watch 192.168.1.0/24 --interval 300 --webhook https://hooks.slack.com/services/T000/B000/XXX

# Generate an Ansible Infrastructure-as-Code Inventory from a live scan
sudo netpulse-discovery generate-inventory 192.168.1.0/24 --format ansible --output hosts.yaml

As a Standalone REST API

You can spin up a dedicated, hyper-fast FastAPI server instantly:

netpulse-discovery serve --port 8000

Then send requests to http://localhost:8000/discovery/scan or http://localhost:8000/discovery/drift/compare.

As a Python Library

Embed the high-performance engine directly into your own applications:

import asyncio
from netpulse.discovery.services.discovery import DiscoveryService
from netpulse.discovery.models.discovery import DiscoveryMethod

async def main():
    service = DiscoveryService()
    # Scans the network using ARP resolution
    result = await service.discover_network(
        "10.0.0.0/24", 
        methods=[DiscoveryMethod.ARP]
    )
    
    for device in result.devices:
        print(f"[{device.ip}] {device.mac} - {device.vendor}")

asyncio.run(main())

📚 Documentation

For more detailed guides, check out the docs/ folder:

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_discovery-0.1.7.tar.gz (27.4 kB view details)

Uploaded Source

Built Distributions

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

netpulse_discovery-0.1.7-cp38-abi3-win_amd64.whl (184.0 kB view details)

Uploaded CPython 3.8+Windows x86-64

netpulse_discovery-0.1.7-cp38-abi3-manylinux_2_34_x86_64.whl (330.0 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.34+ x86-64

netpulse_discovery-0.1.7-cp38-abi3-macosx_11_0_arm64.whl (290.4 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

Details for the file netpulse_discovery-0.1.7.tar.gz.

File metadata

  • Download URL: netpulse_discovery-0.1.7.tar.gz
  • Upload date:
  • Size: 27.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for netpulse_discovery-0.1.7.tar.gz
Algorithm Hash digest
SHA256 f88fae8588f22c041755805a7792020d22f9b979dd0697171590ef16a0012620
MD5 5b30edb3e134be011982795790cfa13d
BLAKE2b-256 fee33c08b899e5cce93fdc37c43dbc2a70d79f04ae1dc3e381d00298aefd51ef

See more details on using hashes here.

File details

Details for the file netpulse_discovery-0.1.7-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for netpulse_discovery-0.1.7-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 903fd1359ef2857da2348e2493cc64b4e0c0f567b556cfaf6ddb210cb44a1861
MD5 d0530441047883b7bd41d7c7289ec594
BLAKE2b-256 203eaf08b5ba60213da75938c4aa4fecb382c91a9811b7cdc47b253421ed0a95

See more details on using hashes here.

File details

Details for the file netpulse_discovery-0.1.7-cp38-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for netpulse_discovery-0.1.7-cp38-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4c7bc9b84db12bffcdac7278e541ca7806546ac1b6fd44af6eb449209099fe7b
MD5 a7caf3a5f22cb411004da87ee838f662
BLAKE2b-256 e3be77365ca3e069b4494d7750fdd5ced77e17f6293813c7a1b87fb2fbe34b31

See more details on using hashes here.

File details

Details for the file netpulse_discovery-0.1.7-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for netpulse_discovery-0.1.7-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 efc18d311f6a89ccf46b4f40ab73854730a30dc064baa778ac7410bd9715db3e
MD5 6c191258aa0fe08487283d119725b61c
BLAKE2b-256 8ef8c6b967ca7239fca2e1d93e0fb7bc7f10aa70d1ca0acff33513e607948426

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