Resource Descriptors in Python Package for serializing and deserializing of XRD and JRD documents Imported from https://github.com/jcarbaugh/python-rd

Mikael Nordfeldth a3b02f181a parse_uri_components instead of parse_host_data %!s(int64=8) %!d(string=hai) anos
examples cf73044a0f add a bunch more tests and dunder methods %!s(int64=12) %!d(string=hai) anos
rd a3b02f181a parse_uri_components instead of parse_host_data %!s(int64=8) %!d(string=hai) anos
.gitignore 72ffb1a2c6 update setup %!s(int64=12) %!d(string=hai) anos
LICENSE bfc32a2ffb Imported some code from python-webfinger by jcarbaugh %!s(int64=8) %!d(string=hai) anos
MANIFEST.in 72ffb1a2c6 update setup %!s(int64=12) %!d(string=hai) anos
README.rst fd4f648071 Right. This is stupid ReST. %!s(int64=11) %!d(string=hai) anos
requirements.txt ba27147cdf update requirements %!s(int64=11) %!d(string=hai) anos
setup.py c785827fe0 Python module (not a single file) should be listed in packages section %!s(int64=11) %!d(string=hai) anos
tests.py f08b698249 One of the tests fixed for python3 %!s(int64=8) %!d(string=hai) anos

README.rst

Resource Descriptors in Python
==============================

Supports serialization/deserialization of XRD (http://docs.oasis-open.org/xri/xrd/v1.0/xrd-1.0.html) and JRD (http://tools.ietf.org/html/rfc6415).

Outstanding issues:

- support ds:Signature
- support XRDS
- parsing of Expires date stamp from XML
- more tests are needed

Basic usage::

from rd import RD, Link

lnk = Link(rel='http://spec.example.net/photo/1.0',
type='image/jpeg',
href='http://photos.example.com/gpburdell.jpg')
lnk.titles.append(('User Photo', 'en'))
lnk.titles.append(('Benutzerfoto', 'de'))
lnk.properties.append(('http://spec.example.net/created/1.0', '1970-01-01'))

rd = RD(subject='http://example.com/gpburdell')
rd.properties.append('http://spec.example.net/type/person')
rd.links.append(lnk)

rd.to_json()
rd.to_xml()