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 Distribution

easynetsim-0.2.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

Details for the file easynetsim-0.2.0.tar.gz.

File metadata

  • Download URL: easynetsim-0.2.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.10.0 Windows/10

File hashes

Hashes for easynetsim-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ed0a224bb53afdf7eadd4b0457dfbcea7d436d2b4216159795aeaec7d53b0bf7
MD5 68457a77efbb6f88328f7305d2e85350
BLAKE2b-256 d5612334407561c34e161d9a2bae490862653982ab9b99612fa06b9ba5dd66ce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: easynetsim-0.2.0-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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6029315658d895523bf6bd854fb0848b71f1ebb8b82bba66269db57b3007654
MD5 f5bb639f9a23753b4d954124769ca9dd
BLAKE2b-256 67625094ddb3929f5e7d0ca6f20303f79d916ea5fa4004f6e2e95cd687223722

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