Skip to content
Tools for
Branch: master
Clone or download
Ryuno-Ki Merge pull request #52 from Ryuno-Ki/spelling
chore(spelling): fix spelling of 'Webmention' everywhere
Latest commit f1ddd7e Jun 28, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Fix most of the pylint/pyflake issues. Mar 6, 2018
docs docs(sphinx): setup sphinx with ReadTheDocs Jun 28, 2019
test chore(lint): fix flake8 issues. Jun 15, 2019
webmentiontools chore(spelling): fix spelling of 'Webmention' everywhere Jun 28, 2019
pytest.ini chore(py2): compatibility layer to Python2.7 Jun 18, 2019
requirements-docs.txt docs(sphinx): setup sphinx with ReadTheDocs Jun 28, 2019
requirements.txt docs(setup): add project urls for PyPI Jun 28, 2019



CircleCI Vulnerabilities Coverage Maintainability Documentation Status

Some simple tools in python to deal with Webmentions.

Note, that this package was formerly known as webmentiontools, but had to be renamed due to PEP-541. (Namely, not classified as abandoned project, because the author was reachable).


  • webmentiontools.send implements WebmentionSend that sends Webmentions.
  • webmentiontools.urlinfo implements UrlInfo() that will rerurn usefull information about a web page, like title, the existance of an "in-reply-to" link, the author name, the author image, etc.
  • webmentiontools.webmentionio provides a class to query

There is also the corresponting command line tool, webmention-tools (which is also a simple example on how to use the library.

Check bin/ on how to use the library to query and present information for all URLs that mentioned


pip install webmention-tools


Command line:

webmention-tools send `source` `target`
webmention-tools urlinfo `url`


Python code to send a Webmention:

from webmentiontools.send import WebmentionSend
source = 'URL of page sending the Webmention'
target = 'URL of page to receive the Webmention'
mention = WebmentionSend(source, target)

Python code to get info about a webpage.

from webmentiontools.urlinfo import UrlInfo
url = 'a link to a web page'
i = UrlInfo(url)
if i.error:
    print('There was an error getting %s' % url)
    print('in-reply-to link: %s' % i.inReplyTo())
    print('publication date: %s' % i.pubDate())
    print('page title: %s' % i.title())
    print('image link: %s' % i.image())


  1. Create a virtualenv with python3
  2. Change into that directory and clone the repository
  3. Activate the virtualenv by sourceing bin/activate
  4. Change into the cloned repository and install dependencies via `pip install -r requirements.txt'
  5. Run pytest --cov=webmentiontools for unit tests with code coverage
You can’t perform that action at this time.