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 8 lat temu
examples cf73044a0f add a bunch more tests and dunder methods 12 lat temu
rd a3b02f181a parse_uri_components instead of parse_host_data 8 lat temu
.gitignore 72ffb1a2c6 update setup 12 lat temu
LICENSE bfc32a2ffb Imported some code from python-webfinger by jcarbaugh 8 lat temu
MANIFEST.in 72ffb1a2c6 update setup 12 lat temu
README.rst fd4f648071 Right. This is stupid ReST. 11 lat temu
requirements.txt ba27147cdf update requirements 11 lat temu
setup.py c785827fe0 Python module (not a single file) should be listed in packages section 11 lat temu
tests.py f08b698249 One of the tests fixed for python3 8 lat temu

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()