Skip to main content

Conversion between rdflib and PyLD data formats for compatibility

Project description

https://travis-ci.org/zimeon/rdflib-pyld-compat.svg?branch=master https://coveralls.io/repos/github/zimeon/rdflib-pyld-compat/badge.svg?branch=master

Support (some) data conversion between rdflib and pyld Python libraries.

The rdflib and PyLD libraries use different in-memory data structures so it is not trivial to use the powerful RDF support of rdflib in conjuction with the JSON-LD processor implementation of PyLD. This code is designed to provide a bridge between rdflib and PyLD in-memory formats, avoiding the need to serialize and then re-parse the data.

N.B. - This code is currently pinned to pyparsing < 3.0.0 and PyLD 1.0.5 so that it works with Python 2.7. If there is any further development this pin should be removed and then it will work only with Python 3.6 and up.

Limitations

This code was developed to support a particular application and then pulled out as I needed it a second time. I haven’t thought hard about the general case and am sure that are additional limitations beyond those I know about. Known limitations:

  • assumes the URIRefs in an rdflib graph do not need expansion with a NamespaceManager

Contributing

I’d be happy to hear of other problems/limitations and/or suggestions for improvement.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rdflib-pyld-compat-0.0.2.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distributions

rdflib_pyld_compat-0.0.2-py3.5.egg (6.3 kB view hashes)

Uploaded Source

rdflib_pyld_compat-0.0.2-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page