I’ve created a simple and easy-to-use Python library to handle the client implementation of the Pingback 1.0 protocol. The pingback.py script handles all aspects of a client, including automatically parsing HTML and reStructredText for hyperlinks which should be checked.
Pingback can now be implemented by other Python projects by using one of the following functions:
def autoPingback(sourceURI, reST = None, HTML = None):
"""Scans the input text, which can be in either reStructuredText or HTML
format, pings every linked website for auto-discovery-capable pingback
servers, and does an appropriate pingback."""
...
def pingback(sourceURI, targetURI):
"""Attempts to notify the server of targetURI that sourceURI refers to
it."""
...
The documentation at the top of the module describes how one might implement a Pingback server by using the SimpleXMLRPCServer module, as well.