Connecting the Trovares xGT graph analytics engine to other applications.
Project description
trovares_connector Package
This Python package is for connecting the Trovares xGT graph analytics engine to other applications. Trovares xGT can significantly speedup Neo4j queries.
The default connector provided is for Neo4j or AuraDB. The package also provides an optional ODBC connector for connecting to databases or applications that support ODBC. Information about the ODBC connector can be found in the documentation.
Homepage: | trovares.com |
Documentation: | trovares.github.io/trovares_connector |
General Help: | github.com/trovares/trovares_connector/discussions |
Requirements
Installation
You can install this python package by executing this command:
python -m pip install trovares_connector
If you want to use the ODBC connector, you can install the optional dependencies like so:
python -m pip install 'trovares_connector[odbc]'
If you don't have Trovares xGT, you can install and run the Developer version from Docker:
docker pull trovares/xgt
docker run --publish=4367:4367 trovares/xgt
Using the trovares_connector
From any Python environment, simply importing both xgt
and trovares_connector
is all that is needed to operate this connector.
A simple example below shows connecting to Neo4j and xGT, transferring the whole graph database to xGT, running a query in xGT, and printing the results:
import xgt
from trovares_connector import Neo4jConnector, Neo4jDriver
# Connect to xGT and Neo4j.
xgt_server = xgt.Connection()
xgt_server.set_default_namespace('neo4j')
neo4j_server = Neo4jDriver(auth=('neo4j', 'foo'))
conn = Neo4jConnector(xgt_server, neo4j_server)
# Transfer the whole graph.
conn.transfer_to_xgt()
# Run the query.
query = "match(a:foo) return a"
job = xgt_server.run_job(query)
# Print results.
print("Results: ")
for row in job.get_data():
print(row)
API
The available properties are:
- neo4j_relationship_types
- neo4j_node_labels
- neo4j_property_keys
- neo4j_node_type_properties
- neo4j_rel_type_properties
- neo4j_nodes
- neo4j_edges
The available methods are:
- get_xgt_schemas
- create_xgt_schemas
- copy_data_to_xgt
- transfer_to_xgt
- transfer_to_neo4j
Examples
Some examples can be found here:
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
File details
Details for the file trovares_connector-2.6.2.tar.gz
.
File metadata
- Download URL: trovares_connector-2.6.2.tar.gz
- Upload date:
- Size: 99.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97c5c48dd89770049ee1803b1562d80080388f73d3fb64154dffd50ae400154c |
|
MD5 | d54b6bbdc04442b745c38782043438f4 |
|
BLAKE2b-256 | ab418e4b6a0fc571bd74b6447c64757469b52122da7c12be408a4b2c920bdddc |
File details
Details for the file trovares_connector-2.6.2-py3-none-any.whl
.
File metadata
- Download URL: trovares_connector-2.6.2-py3-none-any.whl
- Upload date:
- Size: 94.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | acde67d302b33a83845e8146050411876f39b9aa375af3dd036f9915ecbced7d |
|
MD5 | dd57c85e1783f48bdd5e86a087ac1472 |
|
BLAKE2b-256 | ec26a53ca40f6e1003229836071026a8a80f2421cce17e09a207b38b18ab61ce |