[](https://restframework-rdf.readthedocs.io/en/latest/?badge=latest) [](https://doi.org/10.5281/zenodo.8158686)
# restframework-rdf
Django apps for integration between Resource Description Framework (RDF) and [django REST framework](https://www.django-rest-framework.org/). The repository contains two django apps, rdf for general RDF functionality and sparql to add views for SPARQL queries. The functionality is intended as generic and useful for any project that intends to expose an RDF database through a django REST framework API.
These apps were originally developed within the [read-it interface](https://github.com/UUDigitalHumanitieslab/readit-interface). The code was moved to this independent repository so it could be used in another application, [EDPOP](https://github.com/UUDigitalHumanitieslab/EDPOP).
Both of these applications are in active development; as such, this repository may see further updates to serve the needs of different applications. We welcome contributions to make the package more widely applicable.
However, be advised that this repository was primarily developed to be used in our own applications. It may not have the level of documentation that you would expect from a public-facing package. At the very least, the documentation will assume that you have basic familiarity with both RDF and django REST framework.
## Quick start
Follow the [getting started guide](/docs/getting-started.md) to use the app in a django project.
Usage documentation is available in the [documentation directory](/docs/) or [read the docs](https://restframework-rdf.readthedocs.io/en/latest/getting-started/)
## Development and unit tests
These steps are for development on the rdf app itself. Follow the steps below in order to run the unit tests.
### Blazegraph
Before you start, you need to install [Blazegraph](http://blazegraph.com/). The unit tests assume that you have a blazegraph server running and that the namespace ‘rdf-test’ is created. The following steps suffice to make this true.
Follow the [Blazegraph quick start guide](https://github.com/blazegraph/database/wiki/Quick_Start) to download and start the database server and a foreground process. While the server is running, you can access its web interface at http://localhost:9999. This lets you upload and download data, try out queries and review statistics about the dataset. The server can be stopped by typing ctrl-c. Visit the [web interface]( http://localhost:9999), navigate to the NAMESPACES tab. Use the create namespace form to create a new namespace. Choose rdf-test as a name, and set the mode to quads. All other checkboxes should be disabled. A popup is shown with additional settings. Leave these at their default values and choose Create. The created namespace should now appear in the list of namespaces. Choose use to use the rdf-test namespace when operating the web interface
### Running unit tests
Clone this repository
Install the required python packages via pip install -r requirements.txt
Make sure your blazegraph server is running and that the rdf-test namespace exists in quads mode (see above).
Run the unit tests with pytest.
### Usage during development
To use your work-in-progress drf app in a django project, build the package with
`bash python setup.py sdist `
You can now find the package in this repository under dist/restframework-drf-blablabla.tar.gz
To install the package in your project, install via pip as
`bash pip install path/to/repository/dist/restframework-drf-*.targ.gz `
### Documentation
Documentation (in the docs directory) is based on [MkDocs](https://www.mkdocs.org/).
You can browse the documentation in a development server by running
`bash mkdocs serve `
Metadata
Release files for restframework-rdf 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| restframework_rdf-1.2.0.tar.gz | 28.0 kB | Without provenance | Details for restframework_rdf-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| restframework_rdf-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for restframework_rdf-1.2.0-py3-none-any.whl |
Total release size: 60.3 kB
Release files / restframework_rdf-1.2.0.tar.gz
| Download URL | restframework_rdf-1.2.0.tar.gz |
|---|---|
| Size | 28.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
190e65c00c75eecfec41f8ef82563f37da3549140bd82da1b86236e2843e44d0
|
|
BLAKE2b-256 checksum How to use checksums |
f7e2d53de4cc46c52bd4ef68184921d5b121b7715b8b8c2e0feeadf6be9d8b76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / restframework_rdf-1.2.0-py3-none-any.whl
| Download URL | restframework_rdf-1.2.0-py3-none-any.whl |
|---|---|
| Size | 32.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff6410d0c87e256e249e14e4b5c37eb75de6c2894d46e94fddb5fe8125301335
|
|
BLAKE2b-256 checksum How to use checksums |
62d1950a112d76c1bbebc2cc04a93ddb88775de55b03e55830ad0b897b3584d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Security for restframework-rdf 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.