Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Graph.fromN3 #35

Closed
ghost opened this issue Feb 20, 2012 · 0 comments
Closed

add Graph.fromN3 #35

ghost opened this issue Feb 20, 2012 · 0 comments

Comments

@ghost
Copy link

ghost commented Feb 20, 2012

drewpca, 2008-12-26T22:31:59.000Z

It would help the creation of our test cases, rdflib's test cases, bug
reports, and tutorials if there was a one-liner to make a graph initialized
from some N3. I propose this API:

from rdflib.Graph import Graph
graph = Graph.fromN3("""
@prefix ...

""")

Comment 1 by lindstr...@gmail.com
In trunk, I think the 'data' parameter to 'Graph.parse' is good enough. Use like::

    from rdflib.graph import Graph
    graph = Graph( format="n3", data="""@prefix ... """)

Can this issue thus be closed? (Sure, the relevant tests should be adapted to use this as well..)


Comment 2 by drewpca
Yes, that's equivalent to what I was looking for. Thanks for the update.

Should we have a label for 'put this in the release notes'?
@ghost ghost closed this as completed Feb 20, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants