Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Analyze your network traffic with ease

Project description

Network Analyzer

Installation

Clone the repository and go to its root folder and run:

sudo pip install -e .

Run Server

Using PM2

To run JSON-RPC server over HTTP as well as Websocket:

pm2 start pm2.json

Using shell script

To run JSON-RPC server over http on port 5000:

sh scripts/serve_rpc.sh

To run RPC server over web socket (socket.io) on port 5050:

sh scripts/serve_socket.sh

Client

Python (2.7)

  1. Install JSON-RPC client tinyrpc by running:
sudo pip install tinyrpc
  1. Sample Python 2.7 client code to access JSON-RPC API
from tinyrpc.protocols.jsonrpc import JSONRPCProtocol
from tinyrpc.transports.http import HttpPostClientTransport
from tinyrpc import RPCClient

rpc_client = RPCClient(
    JSONRPCProtocol(),
    HttpPostClientTransport('http://localhost:5000/v1/jsonrpc')
)

rpc_server = rpc_client.get_proxy()

print "pinging..."
pong = rpc_server.ping()
print "ping response: " + pong
resp = rpc_server.hello("John")
print "hello world response: " + resp

Project details


Download files

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

Files for network-analyzer, version 0.0.2.5
Filename, size File type Python version Upload date Hashes
Filename, size network_analyzer-0.0.2.5-py2-none-any.whl (6.6 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size network-analyzer-0.0.2.5.tar.gz (10.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page