-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
78 additions
and
16 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,34 @@ | ||
.. ArangoRDF documentation master file, created by | ||
sphinx-quickstart on Sat Dec 9 18:56:57 2023. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
.. image:: /static/adb_logo.png | ||
.. image:: /static/rdf_logo.png | ||
|
||
Welcome to ArangoRDF's documentation! | ||
===================================== | ||
| | ||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
ArangoRDF | ||
------------- | ||
|
||
Welcome to the documentation for **ArangoRDF**, a Python adapter for ArangoDB_ & RDF_. | ||
|
||
Requirements | ||
============= | ||
|
||
- ArangoDB version 3.9+ | ||
- Python version 3.8+ | ||
|
||
Installation | ||
============ | ||
|
||
.. code-block:: bash | ||
~$ pip install arango-rdf --upgrade | ||
Contents | ||
======== | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
Indices and tables | ||
================== | ||
overview | ||
specs | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` | ||
.. _ArangoDB: https://www.arangodb.com | ||
.. _RDF: https://www.w3.org/RDF/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Getting Started | ||
--------------- | ||
|
||
Here is an example showing how the **arango-rdf** package can be used: | ||
|
||
.. testcode:: | ||
|
||
from rdflib import Graph | ||
from arango import ArangoClient | ||
from arango_rdf import ArangoRDF | ||
|
||
# Initialize the ArangoDB db client. | ||
db = ArangoClient(hosts='http://localhost:8529).db('_system', username='root', password='passwd') | ||
|
||
# Initialize ArangoRDF | ||
arangordf = ArangoRDF(db) | ||
|
||
# Create a new RDF graph. | ||
rdf_graph = Graph() | ||
rdf_graph.parse("https://raw.githubusercontent.com/stardog-union/stardog-tutorials/master/music/beatles.ttl") | ||
|
||
# RDF to ArangoDB | ||
adb_graph_rpt = adbrdf.rdf_to_arangodb_by_rpt("BeatlesRPT", rdf_graph, overwrite_graph=True) | ||
adb_graph_pgt = adbrdf.rdf_to_arangodb_by_pgt("BeatlesPGT", rdf_graph, overwrite_graph=True) | ||
|
||
# ArangoDB to RDF | ||
rdf_graph_2, adb_mapping = adbrdf.arangodb_graph_to_rdf("Beatles", Graph()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
API Specification | ||
----------------- | ||
|
||
This page contains the specification for all classes and methods available in | ||
arango-rdf. | ||
|
||
.. _ArangoRDF: | ||
|
||
ArangoRDF | ||
========= | ||
|
||
.. autoclass:: arango_rdf.main.ArangoRDF | ||
:members: | ||
|
||
.. _ArangoRDFController: | ||
|
||
ArangoRDFController | ||
=================== | ||
|
||
.. autoclass:: arango_rdf.controller.ArangoRDFController | ||
:members: |