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:
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', identifier="fooo")
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-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 manage.py import_rdf --context=http://example.com my_file.rdf $ python manage.py export_rdf --context=http://example.com
License
rdflib-django3 is licensed under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rdflib-django3-0.3.1.tar.gz.
File metadata
- Download URL: rdflib-django3-0.3.1.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/43.0.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df30b63774d88b3380a4c4379dd556c0b3516ba0ff2e45dba9d3de8caa9ecb51
|
|
| MD5 |
b84d4708758de610d878e13ff5d86465
|
|
| BLAKE2b-256 |
3be0ded43e4793d0cee3c32a6a0c9178f3a219be7cb8921f3ebc3a0d295adde6
|
File details
Details for the file rdflib_django3-0.3.1-py3-none-any.whl.
File metadata
- Download URL: rdflib_django3-0.3.1-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/43.0.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7fad79e3f229ba03a93a495ca85e196afb99d91781c4d73411f38cd7c1187cc
|
|
| MD5 |
8a1c0ddbd06abdb812dce36db0cba0b3
|
|
| BLAKE2b-256 |
4f4802f0191bacf953bbdfa8cac4d3e364f656625c2d591372694593314bfcec
|