README.rst 880 B

123456789101112131415161718192021222324252627282930
  1. Resource Descriptors in Python
  2. ==============================
  3. 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).
  4. Outstanding issues:
  5. - support ds:Signature
  6. - support XRDS
  7. - parsing of Expires date stamp from XML
  8. - more tests are needed
  9. Basic usage::
  10. from rd import RD, Link
  11. lnk = Link(rel='http://spec.example.net/photo/1.0',
  12. type='image/jpeg',
  13. href='http://photos.example.com/gpburdell.jpg')
  14. lnk.titles.append(('User Photo', 'en'))
  15. lnk.titles.append(('Benutzerfoto', 'de'))
  16. lnk.properties.append(('http://spec.example.net/created/1.0', '1970-01-01'))
  17. rd = RD(subject='http://example.com/gpburdell')
  18. rd.properties.append('http://spec.example.net/type/person')
  19. rd.links.append(lnk)
  20. rd.to_json()
  21. rd.to_xml()