ArangoDB-DGL Adapter
The ArangoDB-DGL Adapter exports Graphs from ArangoDB, a multi-model Graph Database, into Deep Graph Library (DGL), a python package for graph neural networks, and vice-versa.
About DGL
The Deep Graph Library (DGL) is an easy-to-use, high performance and scalable Python package for deep learning on graphs. DGL is framework agnostic, meaning if a deep graph model is a component of an end-to-end application, the rest of the logics can be implemented in any major frameworks, such as PyTorch, Apache MXNet or TensorFlow.
Quickstart
# Import the ArangoDB-DGL Adapter
from adbdgl_adapter.adapter import ADBDGL_Adapter
# Import a sample graph from DGL
from dgl.data import KarateClubDataset
# This is the connection information for your ArangoDB instance
# (Let's assume that the ArangoDB fraud-detection data dump is imported to this endpoint)
con = {
"hostname": "localhost",
"protocol": "http",
"port": 8529,
"username": "root",
"password": "rootpassword",
"dbName": "_system",
}
# This instantiates your ADBDGL Adapter with your connection credentials
adbdgl_adapter = ADBDGL_Adapter(con)
# ArangoDB to DGL via Graph
dgl_fraud_graph = adbdgl_adapter.arangodb_graph_to_dgl("fraud-detection")
# ArangoDB to DGL via Collections
dgl_fraud_graph_2 = adbdgl_adapter.arangodb_collections_to_dgl(
"fraud-detection",
{"account", "Class", "customer"}, # Specify vertex collections
{"accountHolder", "Relationship", "transaction"}, # Specify edge collections
)
# ArangoDB to DGL via Metagraph
metagraph = {
"vertexCollections": {
"account": {"Balance", "account_type", "customer_id", "rank"},
"customer": {"Name", "rank"},
},
"edgeCollections": {
"transaction": {"transaction_amt", "sender_bank_id", "receiver_bank_id"},
"accountHolder": {},
},
}
dgl_fraud_graph_3 = adbdgl_adapter.arangodb_to_dgl("fraud-detection", metagraph)
# DGL to ArangoDB
dgl_karate_graph = KarateClubDataset()[0]
adb_karate_graph = adbdgl_adapter.dgl_to_arangodb("Karate", karate_dgl_g)
Development & Testing
Prerequisite: arangorestore must be installed
git clone https://github.com/arangoml/dgl-adapter.gitcd dgl-adapterpython -m venv .venvsource .venv/bin/activate(MacOS) or.venv/scripts/activate(Windows)pip install -e . pytestpytest
Metadata
Release files for adbdgl-adapter 1.0.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 |
|---|---|---|---|---|
| adbdgl_adapter-1.0.0.tar.gz | 22.2 kB | Without provenance | Details for adbdgl_adapter-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| adbdgl_adapter-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for adbdgl_adapter-1.0.0-py3-none-any.whl |
Total release size: 36.7 kB
Release files / adbdgl_adapter-1.0.0.tar.gz
| Download URL | adbdgl_adapter-1.0.0.tar.gz |
|---|---|
| Size | 22.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6caf345551f0233bb8d94ee21c96a62ac9cdf374b1771632567466afe975c163
|
|
BLAKE2b-256 checksum How to use checksums |
e0a545e968df1250806b2d667772ed4d7c7ecad88c2e341c8a80da4523721354
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
|
Release files / adbdgl_adapter-1.0.0-py3-none-any.whl
| Download URL | adbdgl_adapter-1.0.0-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7cc93d8eb9c416c441fcbd95a50f767c98c6981ece430fb3cf73979cc39b6d96
|
|
BLAKE2b-256 checksum How to use checksums |
93b6fc43bfb9f9172b39f3fc0f1684c3b7cfc380f65a4a016b2d6f668e386d3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
|
Security for adbdgl-adapter 1.0.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.