python client library for the Verified Email Protocol (aka "BrowserID")
Switch branches/tags
Pull request Compare This branch is 10 commits behind mozilla:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


PyVEP: a python library for the Verified Email Protocol

This is a python client library for the Verified Email Protocol, a.k.a Mozilla's BrowserID project. See here for details:

And see here for how to integrate it into your website:

For the vast majority of deployments, you will simply want to call the "verify" functon to verify a given assertion:

>>> data = vep.verify(BROWSERIDASSERTION, "")
>>> print data["email"]

The precise implementation of this function will change depending on the current recommendedations of the BrowserID team. Currently it POSTs the assertion to the remote verifier services on

For improved performance, or if you just want to live on the bleeding edge, you can explicitly perform verification locally like so:

>>> data = vep.verify_local(BROWSERIDASSERTION, "")
>>> print data["email"]

Note that the details of the Verified Email Protocol are still in flux, so local verification might break due to incompatible changes. As things stabilise this will become the default implementation.

If you have specialised needs, you can also create a "verifier" class to encapsulate any custom settings you may require. For example, here is how to do remote verification using a custom url-opening function:

>>> verifier = vep.RemoteVerifier(urlopen=my_urlopen_func)
>>> data = verifier.verify_local(BROWSERIDASSERTION, "")
>>> print data["email"]