diff options
Diffstat (limited to 'creactistore/_templates/lib/rdflib_/__init__.py')
-rw-r--r-- | creactistore/_templates/lib/rdflib_/__init__.py | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/creactistore/_templates/lib/rdflib_/__init__.py b/creactistore/_templates/lib/rdflib_/__init__.py new file mode 100644 index 0000000..1006fc1 --- /dev/null +++ b/creactistore/_templates/lib/rdflib_/__init__.py @@ -0,0 +1,73 @@ +"""\ +A pure Python package providing the core RDF constructs. + +The packages is intended to provide the core RDF types and interfaces +for working with RDF. 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 +rdflib_ package. + +The primary interface `rdflib_` exposes to work with RDF is +`rdflib_.graph.Graph`. + +A tiny example: + + >>> import rdflib_ + + >>> g = rdflib_.Graph() + >>> result = g.parse("http://www.w3.org/People/Berners-Lee/card") + + >>> print("graph has %s statements." % len(g)) + graph has 79 statements. + >>> + >>> for s, p, o in g: + ... if (s, p, o) not in g: + ... raise Exception("It better be!") + + >>> s = g.serialize(format='n3') + +""" +__docformat__ = "restructuredtext en" + +# The format of the __version__ line is matched by a regex in setup.py +__version__ = "3.2.0" +__date__ = "2012/01/19" + +__all__ = [ + 'URIRef', + 'BNode', + 'Literal', + 'Variable', + + 'Namespace', + + 'Graph', + 'ConjunctiveGraph', + + 'RDF', + 'RDFS', + 'OWL', + 'XSD', + + 'util', + ] + +import sys +# generator expressions require 2.4 +assert sys.version_info >= (2, 4, 0), "rdflib_ requires Python 2.4 or higher" +del sys + + +from rdflib_.term import URIRef, BNode, Literal, Variable + +from rdflib_.namespace import Namespace + +from rdflib_.graph import Graph, ConjunctiveGraph + +from rdflib_.namespace import RDF, RDFS, OWL, XSD + +from rdflib_ import plugin +from rdflib_ import query + +from rdflib_ import util + |