Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Store implementation for RDFlib using Django models as its backend

Project Description

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

The current implementation is context-aware but not formula-aware. Furthermore, performance has not yet been considered.

The implementation assumes that contexts are used for named graphs.

Quick start

Install rdflib-django with your package manager:

pip install rdflib-django

Add rdflib_django to your INSTALLED_APPS:

INSTALLED_APPS = (
    # other apps
    'rdflib_django'.
)

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')
graph.open(create=True)

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('http://example.com')

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

from rdflib_django import utils
graph = utils.get_conjunctive_graph()

Management commands

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

$ python manage.py import_rdf --context=http://example.com my_file.rdf
$ python manage.py export_rdf --context=http://example.com

License

rdflib-django is licensed under the MIT license.

Release History

Release History

This version
History Node

0.3

History Node

0.2.dev-201210061248

History Node

0.2.dev-201210060903

History Node

0.2.dev-201210011245

History Node

0.1.1

History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
rdflib_django-0.3-py2.7.egg (42.4 kB) Copy SHA256 Checksum SHA256 2.7 Egg Oct 25, 2012
rdflib-django-0.3.tar.gz (14.5 kB) Copy SHA256 Checksum SHA256 Source Oct 25, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting