Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Store implementation for RDFlib using Django models as its backend (fork)

Project description

fork from rdflib-django with multi store architecture, python3 and recent rdflib compatibility.

A store implementation for rdflib that uses Django as its backend.

The current implementation is context-aware but not formula-aware.

The implementation assumes that contexts are used for named graphs.

Quick start

Install rdflib-django3 with your package manager:

pip install rdflib-django3

Add rdflib_django to your INSTALLED_APPS:

    # other apps

You can now use the following examples to obtain a graph.

Getting a graph using rdflib’s store API:

from rdflib import Graph
graph = Graph('Django', identifier="fooo")

This example will give you a graph identified by a blank node within the default store.

Getting a conjunctive graph using rdflib’s store API:

from rdflib import ConjunctiveGraph
graph = ConjunctiveGraph('Django')

This example will give you a conjunctive graph in the default store.

Getting a named graph using rdflib-django’s API:

from rdflib_django import utils
graph = utils.get_named_graph('')

Getting the conjunctive graph using rdflib-django3’s API:

from rdflib_django import utils
graph = utils.get_conjunctive_graph()

Management commands

rdflib-django3 includes two management commands to import and export RDF:

$ python import_rdf --context= my_file.rdf
$ python export_rdf --context=


rdflib-django3 is licensed under the MIT license.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for rdflib-django3, version 0.3.3
Filename, size File type Python version Upload date Hashes
Filename, size rdflib_django3-0.3.3-py3-none-any.whl (16.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size rdflib-django3-0.3.3.tar.gz (21.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page