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

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