Introducing WebFinger and a python client -

Introducing WebFinger and a python client

pydpwebfingerOne repeatedly upcoming problem is what identifier a normal user would use for identifying his or her own user account. One approach is apparently OpenID in which case it is a HTTP URL. For the one or other reason though OpenID has not the success among non-geeks as one would wish for. This led to some people thinking about different ways for an identifier scheme to identify yourself on the web. And the thinking was: „People do think of their email addresses as personal identifier, so why not use those?“.

One result of this was the E-mail-Address-to-URL-Translation, in short EAUT. The idea was to these esp. to OpenIDs.

Now another idea is born at Google: WebFinger. It’s goal is a bit more than just providing an easy to understand identifier in that it also aims to retrieving information about the user, like the finger protocol did back in the days. It’s chaining together some upcoming protocols, like XRD and the proposed acct: URI scheme.

How does a WebFinger identifier look like?

It’s like an e-mail address but with an additonal acct: in front:

A WebFinger client would then use a discovery mechanism known as Link based resource descriptor discovery (LRDD) to obtain more information about this user which comes as an XRD file and most likely will point to other services a user might have data stored at (like a profile).

The acct: scheme is here used to make it a valid URI again because mailto: is not semantically correct.

While I personally do not think that inventing a new email-based identifier is solving the problem of user’s confusion on what their identifier is, I nevertheless implemented WebFinger support in the more general discovery library called pydataportability.discovery. More on the issues I see with it maybe in a different blog post.


pydataportability is (or going to be) a set of libraries for handling various protocols used in the open web/distributed social networking/data portability world. It contains right now basic support for Microformats (hCard and XFN), includes an XRDS-Simple parser and from today on also support for parsing XRD files as well as for discovery (which is going from a URI of a resource like document to the actual resource description file marked up in XRD).

Today I released the following components:

You can find more documentation on the pydataportability homepage.

Be aware though that nearly all used protocols are not stable. XRD, WebFinger and the discovery stack are much likely to change soon and thus the state of the library might not match the specifications anymore. Moreover this really is a prototype and some structures and names are also likely to change in the future.

How to install and use it

Luckily Google and Yahoo already have implemented support for WebFinger although you need to enable it for your account (at least in Google’s case, I haven’t tested it with Yahoo yet).

After installing pydataportability.discovery also provides two commands for performing discovery. This is really just an example though as the main use of this to include it in your application and do something else with the data retrieved. These commands are called „discover“ and „webfinger“.

I recommend to install pydataportability inside a virtualenv. You can do so like follows (I assume you have easy_install installed):

sudo easy_install virtualenv
virtualenv pydp_env --no-site-packages
cd pydp_env
bin/easy_install pydataportability.discovery

discover command to perform discovery on any XRD enabled resource (but only via hostmeta at the moment). Or you can use the webfinger command to perform discovery on WebFinger identifiers:

$ bin/webfinger
Rels:  ['']
URIs: ['']
Media Types: []
Prio: 0
Templates: []

But as said before, this is really just a proof of concept. On how to use this in your own application please
check out the pydataportability.discovery documentation. You will also find out in there on how you can provide your own plugins to control the discovery workflow yourself.

More information about WebFinger

You can read more about WebFinger here:

3 Kommentare » Schreibe einen Kommentar

  1. great, thanks! Guess I have to change everything again now ;-) (and maybe I should number releases by the draft number they represent).

    Is there also some summary on what has been changed?

  2. Pingback: Episode 20 – Wer bin ich?