Created
December 2, 2010 22:47
-
-
Save edsu/726250 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> g = rdflib.Graph() | |
| >>> g.add((rdflib.URIRef('urn:uuid:0031'), rdflib.URIRef('http://example.com/foo'), rdflib.Literal('bar'))) | |
| >>> print g.serialize(format='nt') | |
| <urn:uuid:0031> <http://example.com/foo> "bar" . | |
| >>> print g.serialize(format='turtle') | |
| @prefix ns1: <http://example.com/> . | |
| <urn:uuid:0031> ns1:foo "bar" . | |
| >>> print g.serialize(format='n3') | |
| @prefix ns1: <http://example.com/> . | |
| <urn:uuid:0031> ns1:foo "bar" . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment