Skip to main content

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.

https://secure.travis-ci.org/publysher/rdflib-django.png

Quick start

Add the rdflib-django sources to your project, and add rdflib_django to your INSTALLED_APPS in settings.py.

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 django_rdflib’s API:

from django_rdflib import utils
graph = utils.get_named_graph('http://example.com')

Getting the conjunctive graph using django_rdflib’s API:

from django_rdflib 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.

Project details


Download files

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

Source Distribution

rdflib-django-0.1.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rdflib_django-0.1-py2.7.egg (38.2 kB view details)

Uploaded Egg

File details

Details for the file rdflib-django-0.1.tar.gz.

File metadata

  • Download URL: rdflib-django-0.1.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rdflib-django-0.1.tar.gz
Algorithm Hash digest
SHA256 af4a17a2beb2d083ca2ea092404360f7f71beb566806ae024a94e697e012cb13
MD5 2f5affe8ac06698df51c28d506a9a8e6
BLAKE2b-256 7c8392dba5b317e7b68f94ebedb22c33d00037bd928119d8c724c6cbde5d2880

See more details on using hashes here.

File details

Details for the file rdflib_django-0.1-py2.7.egg.

File metadata

File hashes

Hashes for rdflib_django-0.1-py2.7.egg
Algorithm Hash digest
SHA256 e5ad965e32acdfa581bcd8a647c21a7f5565498ecce5d68b02d5c90ceb7c4855
MD5 7d3e847b7842f5603f3a24c8969c2294
BLAKE2b-256 b8453dd52dda1e443a3376c7e10c2011abf99e50f4e7870f1621bea2ac0494d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page