This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Nomit is a small library that can be used to process HTTP/XML POST requests from Monit instances. While it is a relatively trivial adaption of Python’s BaseHTTPRequestHandler, it may be useful to multiple other projects. For this reason Nomit is registered as its own little project.

Monit is a free utility for managing Unix systems. Multiple Monit instances can be centrally managed by its sister project MMonit. Monit communicates with MMonit through HTTP/XML POST request.


Nomit uses the lxml.objectify module from the lxml project. Many Linux distributions provide lxml in their native package format.

The MonitHandler class

Nomit provides a single class MonitHandler which is a sub-class of BaseHTTPRequestHandler. MonitHandler is meant to be sub-classed itself.

It provides two methods:

  • handle_unparsed() is called with the raw XML of the HTTP/XML POST request.
  • handle_parsed() is called after the XML has been parsed by lxml.objectify.fromstring().

The default implementation of these methods does nothing. Any derived class must implement these methods as necessary.


The example below implements handle_unparsed() to print the raw XML as POSTed by the Monit agent and uses handle_parsed() to display the data structure returned by lxml.objectify.fromstring():

import BaseHTTPServer
import xml.dom.minidom
import lxml.objectify
import nomit

class ExampleHandler(nomit.MonitXmlHandler):
    def handle_unparsed(self, s):
        print xml.dom.minidom.parseString(s).toprettyxml()

    def handle_parsed(self, o):
        print lxml.objectify.dump(o)

server = BaseHTTPServer.HTTPServer(("", 2811), ExampleHandler)

Monit configuration

The Monit agent must be told to POST status information to the Python script above. From the agent’s point of view the script is simply (another[1]_) MMonit server.


set mmonit

_[1] The set mmonit directive accepts multiple URLs.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
nomit-1.0.tar.gz (3.7 kB) Copy SHA256 Checksum SHA256 Source Apr 19, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting