{"id":17247578,"url":"https://github.com/jcarbaugh/python-xrd","last_synced_at":"2025-04-14T04:42:44.627Z","repository":{"id":57457731,"uuid":"446000","full_name":"jcarbaugh/python-xrd","owner":"jcarbaugh","description":"XRD serializer and deserializer","archived":false,"fork":false,"pushed_at":"2024-03-20T16:40:21.000Z","size":59,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T03:04:17.338Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcarbaugh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2009-12-22T16:23:05.000Z","updated_at":"2022-12-30T17:59:20.000Z","dependencies_parsed_at":"2025-02-24T18:42:07.836Z","dependency_job_id":null,"html_url":"https://github.com/jcarbaugh/python-xrd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcarbaugh%2Fpython-xrd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcarbaugh%2Fpython-xrd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcarbaugh%2Fpython-xrd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcarbaugh%2Fpython-xrd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcarbaugh","download_url":"https://codeload.github.com/jcarbaugh/python-xrd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248824662,"owners_count":21167343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T06:38:21.831Z","updated_at":"2025-04-14T04:42:44.608Z","avatar_url":"https://github.com/jcarbaugh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XRD for Python\n\nExtensible Resource Descriptor is a generic format for describing and discovering resources.\n\npython-xrd supports serialization and deserialization of both:\n\n- XML as defined in [XRD 1.0](http://docs.oasis-open.org/xri/xrd/v1.0/xrd-1.0.html), _execpt XRD Signature and XRDS_.\n- JSON (JRD) as defined in [RFC 6415](https://www.rfc-editor.org/rfc/rfc6415.html#page-12)\n\n## Basic Usage\n\n```python\nfrom xrd import XRD, Link, Title\n\nxrd = XRD(\n    subject=\"http://example.com/someone\",\n    properties={\"http://spec.example.net/type/person\": None},\n    links=[\n        Link(\n            rel=\"http://spec.example.net/photo/1.0\",\n            type=\"image/jpeg\",\n            href=\"http://photos.example.com/someone.jpg\",\n            titles=[Title(\"User Photo\", lang=\"en\"), Title(\"Benutzerfoto\", lang=\"de\")],\n            properties={\"http://spec.example.net/created/1.0\": \"1970-01-01\"}],\n        )\n    ],\n)\nxrd.as_xml()\n```\n\n## Tests\n\n### Test Completeness\n\nIt's important to ensure test cases were covered for all combinations of\nXML/JSON and ser/deser, so completeness is tracked in this chart.\nThere are additional tests, but these are the ones that need to be the same for all.\n\n| Test                       | XML Ser | XML Deser | JSON Ser | JSON Deser |\n| -------------------------- | :-----: | :-------: | :------: | :--------: |\n| xml:id                     |    ✓    |     ✓     |   n/a    |    n/a     |\n| xml attributes             |    ✓    |     ✓     |   n/a    |    n/a     |\n| expires                    |    ✓    |     ✓     |    ✓     |     ✓      |\n| subject                    |    ✓    |     ✓     |    ✓     |     ✓      |\n| alias                      |    ✓    |     ✓     |    ✓     |     ✓      |\n| property                   |    ✓    |     ✓     |    ✓     |     ✓      |\n| property / nil             |    ✓    |     ✓     |    ✓     |     ✓      |\n| property / multi \\*        |    ✓    |     ✓     |    ✓     |     ✓      |\n| link                       |    ✓    |     ✓     |    ✓     |     ✓      |\n| link / validate            |    ✓    |     ✓     |    ✓     |     ✓      |\n| link / title               |    ✓    |     ✓     |    ✓     |     ✓      |\n| link / property            |    ✓    |     ✓     |    ✓     |     ✓      |\n| link / property / nil      |    ✓    |     ✓     |    ✓     |     ✓      |\n| link / property / multi \\* |    ✓    |     ✓     |    ✓     |     ✓      |\n| XRDS                       |    ✕    |     ✕     |   n/a    |    n/a     |\n| signature \\*\\*             |    ✕    |     ✕     |   n/a    |    n/a     |\n\n\\* JRD does not support multiple properties of the same type, per the spec.\nWhen serializing to JSON only the last value will be used if there are\nmultiple properties of the same type.\n\n\\*\\* [XRD Signature](http://docs.oasis-open.org/xri/xrd/v1.0/xrd-1.0.html#signature) is not supported\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcarbaugh%2Fpython-xrd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcarbaugh%2Fpython-xrd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcarbaugh%2Fpython-xrd/lists"}