Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def parse_rdf(data, url, format=None):
    fobj = StringIO(data)
    id = URIRef(url)
    graph = Graph(identifier=id)
    if format is None:
        graph.parse(fobj)
    else:
        graph.parse(fobj, format=format)
    return graph
        


src/f/l/Flask-FedoraCommons-0.0.5/flask_fedora_commons/lib/api.py   Flask-FedoraCommons(Download)
from poster.encode import multipart_encode, MultipartParam
 
from util import auth_headers, datetime_to_fedoratime, \
     RequestFailed, parse_rdf
 
            # parse the result according to requested format
            if format == 'N-Triples':
                return parse_rdf(data, abs_url, format='n3')
            elif format == 'CSV':
                # reader expects a file or a list; for now, just split the string