Skip to main content

A simple network simulator for testing ping and routing

Project description

Easy Network Simulator

A simple network simulator for testing ping and routing between nodes.

Installation

To install this package, run:

pip install easynetsim

Usage

from easynetsim import NetworkSimulator

# Define network configuration
config = {
    "nodes": [
        {"hostname": "router1", "ip": "192.168.1.1", "type": "router"},
        {"hostname": "server1", "ip": "192.168.1.10", "type": "server"},
        {"hostname": "client1", "ip": "192.168.1.100", "type": "client"},
    ],
    "links": [
        {
            "source": "router1",
            "destination": "server1",
            "latency": 10,
            "packet_loss": 0.05,
        },
        {
            "source": "router1",
            "destination": "client1",
            "latency": 20,
            "packet_loss": 0.01,
        },
    ],
}

# Initialize network simulator
simulator = NetworkSimulator()
simulator.load_network(config)

# Demonstrate ping operation
result = simulator.ping("client1", "192.168.1.10")
print(result)

Examples

More examples located in examples folder.

Roadmap

  • Test cases
  • Action for release autopublish

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

easynetsim-0.1.3-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file easynetsim-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: easynetsim-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.10.0 Windows/10

File hashes

Hashes for easynetsim-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e899b380860aed5a30f1154a935ffa16f2535fecd4868a414fd4d6fe9e44a943
MD5 2a6aa49a0826d009e7d0e64e21674a10
BLAKE2b-256 2603458a63665ec88e7a6c9640ddb62266bc938caba78bef3da7d225c3536934

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