Import RDF graphs into ArangoDB
Project description
DEVELOPMENT VERSION - WIP - EXPECT BREAKING CHANGES
Arango-RDF
Import/Export RDF graphs with ArangoDB
About RDF
RDF is a standard model for data interchange on the Web. RDF has features that facilitate data merging even if the underlying schemas differ, and it specifically supports the evolution of schemas over time without requiring all the data consumers to be changed.
RDF extends the linking structure of the Web to use URIs to name the relationship between things as well as the two ends of the link (this is usually referred to as a "triple"). Using this simple model, it allows structured and semi-structured data to be mixed, exposed, and shared across different applications.
This linking structure forms a directed, labeled graph, where the edges represent the named link between two resources, represented by the graph nodes. This graph view is the easiest possible mental model for RDF and is often used in easy-to-understand visual explanations.
Resources to get started:
Installation
Latest Release
pip install arango-rdf
Current State
pip install git+https://github.com/ArangoDB-Community/ArangoRDF
Quickstart
from arango_rdf import ArangoRDF
# RDF Import
adb_rdf = ArangoRDF(host="http://localhost:8529", username="root", password="openSesame", database="rdf", graph="rdf_music")
adb_rdf.init_rdf_collections(bnode="Blank")
adb_rdf.import_rdf("./examples/data/music_schema.ttl", format="ttl")
adb_rdf.import_rdf("./examples/data/beatles.ttl", format="ttl")
# RDF Export
adb_rdf.export(f"./examples/data/rdfExport.ttl", format="ttl")
# Re-import RDF Export
adb_rdf.import_rdf(f"./examples/data/rdfExport.ttl", format="ttl")
# Ontology Import
adb_rdf_2 = ArangoRDF("http://localhost:8529", "root", "openSesame", "ontologyImport", "ontology_iao")
adb_rdf_2.init_ontology_collections()
adb_rdf_2.import_ontology("./examples/data/iao.owl")
Development & Testing
git clone https://github.com/ArangoDB-Community/ArangoRDF
cd arango-rdf
- (create virtual environment of choice)
pip install -e .[dev]
- (create an ArangoDB instance with method of choice)
python tests/test.py
(assumesusername=root
,password=openSesame
)
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
Hashes for arango_rdf-0.0.1.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eef51526a5ea8314c13020b17640ce9760794b5755c207401bf2f51cf70c843 |
|
MD5 | 9d81a68402c78bb58a47238d4caafff6 |
|
BLAKE2b-256 | 7961622ea727363ad7f34cce14142e007f1a61cdcd28f0fff41aef5f2bc12592 |