Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcarbaugh/python-rd
Package for serializing and deserializing of XRD and JRD documents
https://github.com/jcarbaugh/python-rd
Last synced: 22 days ago
JSON representation
Package for serializing and deserializing of XRD and JRD documents
- Host: GitHub
- URL: https://github.com/jcarbaugh/python-rd
- Owner: jcarbaugh
- License: bsd-3-clause
- Created: 2012-11-02T21:40:15.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2019-05-14T14:12:00.000Z (over 5 years ago)
- Last Synced: 2024-12-01T09:12:47.572Z (25 days ago)
- Language: Python
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
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 neededBasic 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()