Skip to main content

Notch brings a programmatic interface to all your network equipment like switches, routers and firewalls. Its Agent manages the command-line interfaces of network equipment in your network so that you can write powerful network management applications using the included Python library or from other languages by using the JSON-RPC interface.

For example, to get the version information from every cisco-ish device on your network (via a Notch Agent running at localhost:8080):

#!/usr/bin/env python

import notch.client

def callback(request):
  """Called by the Notch Client when a request is complete."""
  if request.error:
    print 'Exception: ', str.error.__class__.__name__
    print str(request.error)
  else:
    print request.result

nc = notch.client.Connection('localhost:8080')

# Gets a list of devices from the Notch Agent.
try:
  all_devices = nc.devices_matching('^.*$')
except notch.client.Error:
  print 'Error querying for devices.'
  all_devices = []

# Send the command to each device, asynchronously receiving results.
for device in all_devices:
  nc.command(device, 'show version', callback=callback)

# Wait for all outstanding requests to complete.
nc.wait_all()

Installation

Use pip to install both the Notch Agent or Client library.

You’ll need both packages to start with, but in larger installations, only machines acting as Agents require the notch.agent package.

$ pip install notch.agent $ pip install notch.client

This will install all but one dependency, which can be then installed using:

$ pip install -e git+https://github.com/joshmarshall/tornadorpc.git@fda3e0e4#egg=tornadorpc-dev

You can also use easy_install, but we don’t recommend that. If you don’t have pip, install it with easy_install first.

Configuration

The Notch Agent requires some configuration to get started, and things are easiest if you already use the RANCID system, as the Notch Agent will read its router.db configuration file to populate its inventory.

Then, you can start a Notch Agent using the built-in testing server:

$ notch-agent --config=/path/to/your/notch.yaml

The built-in testing server does not support parallel operation, so you must use a WSGI compatible server for production operation. Apache2 with mod_wsgi is used for many installations and an example configuration can be found in config/notch-mod_wsgi.sample.conf. The WSGI application object itself is defined in wsgi/notch.wsgi.

Metadata

Release files for notch.agent 0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for notch.agent 0.5
File Size Uploaded Provenance
notch.agent-0.5.tar.gz 34.4 kB Without provenance Details

Release files / notch.agent-0.5.tar.gz

Download URL notch.agent-0.5.tar.gz
Size 34.4 kB
Tags Source
SHA-256 checksum
How to use checksums
121de34585feb62ec069588526c37ff85b2c5ec7a1872e9356fb56120f173145
BLAKE2b-256 checksum
How to use checksums
62a89453babfe63ff089987acbf7873f771bd0e0167c98b8a4e3457c1f43dbc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for notch.agent 0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page