A pure Python package providing the core RDF constructs.
Project description
A pure Python package providing the core RDF constructs.
The packages is intended to provide the core RDF types and interfaces that other packages can build on. The package defines a plugin interface for parsers, stores, and serializers that other packages can use to implement parsers, stores, and serializers that will plug into the rdf package.
The rdf package does not itself contain any plugin implementation. So, you will want to install a library that builds upon rdf and defines some plugin implementations. One such library is rdflib version 3.x.
The primary interface rdf exposes to work with RDF is rdf.graph.Graph.
A tiny example:
>>> from rdf.graph import Graph>>> g = Graph() >>> result = g.parse("http://eikeon.com/foaf.rdf")>>> print "graph has %s statements." % len(g) graph has 34 statements. >>> >>> for s, p, o in g: ... if (s, p, o) not in g: ... raise Exception("It better be!")>>> s = g.serialize(format='n3')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file rdf-0.9a6.tar.gz
.
File metadata
- Download URL: rdf-0.9a6.tar.gz
- Upload date:
- Size: 48.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d24956079b40284f283a3ea526839872bbe4323b2862c48fd81a718d1c6f761 |
|
MD5 | fe10313621763d407b7f6ec243c1459f |
|
BLAKE2b-256 | eac614c7745ec5ebbab06c3aa3b1b5e50958dc15b1397becb481aba40e27236d |
File details
Details for the file rdf-0.9a6-py2.5.egg
.
File metadata
- Download URL: rdf-0.9a6-py2.5.egg
- Upload date:
- Size: 86.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e83862ccc09e14e7557262e245acc6f7ce726553208e49178129854060cd116 |
|
MD5 | 6649c8a1d325b123f7b6f364bf4f5c89 |
|
BLAKE2b-256 | 0212ce3d232d663c8000f81be9a82548677c6027cbe582a69cb1221059980b4d |