Skip to main content

Shortest Path (Dijkstra) : Apache AGE Python Driver

Apache AGE is a PostgreSQL extension that provides graph database functionality. The goal of the Apache AGE project is to create single storage that can handle both relational and graph model data so that users can use standard ANSI SQL along with openCypher, the Graph query language. This repository hosts the development of the Python driver for this Apache extension (currently in Incubator status). Thanks for checking it out.

A graph consists of a set of vertices (also called nodes) and edges, where each individual vertex and edge possesses a map of properties. A vertex is the basic object of a graph, that can exist independently of everything else in the graph. An edge creates a directed connection between two vertices. A graph database is simply composed of vertices and edges. This type of database is useful when the meaning is in the relationships between the data. Relational databases can easily handle direct relationships, but indirect relationships are more difficult to deal with in relational databases. A graph database stores relationship information as a first-class entity. Apache AGE gives you the best of both worlds, simultaneously.

Apache AGE is:

  • Powerful -- AGE adds graph database support to the already popular PostgreSQL database: PostgreSQL is used by organizations including Apple, Spotify, and NASA.
  • Flexible -- AGE allows you to perform openCypher queries, which make complex queries much easier to write.
  • Intelligent -- AGE allows you to perform graph queries that are the basis for many next level web services such as fraud & intrustion detection, master data management, product recommendations, identity and relationship management, experience personalization, knowledge management and more.

Features

  • Cypher query support for Psycopg2 PostreSQL driver (enables cypher queries directly)
  • Deserialize AGE result (AGType) to Vertex, Edge, Path
  • Shortest Path dijkstra algorithm implemented

Requirements

sudo apt-get update
sudo apt-get install python3-dev libpq-dev
pip install --no-binary :all: psycopg2
pip install antlr4-python3-runtime==4.11.1

Install via PIP

pip install apache-age-dijkstra 

Build from Source

git clone https://github.com/rhizome-ai/apache-age-python
cd apache-age-python
python setup.py install

import

from age_dijkstra import Age_Dijkstra

Making connection to postgresql (when using docker reepository)

con = Age_Dijkstra(host="localhost", port="5430", dbname="postgresDB", user="postgresUser", password="postgresPW",printMessage = True)

For more information about Apache AGE

License

Apache-2.0 License

Metadata

Release files for apache-age-dijkstra 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apache-age-dijkstra 0.1.1
File Size Uploaded
apache-age-dijkstra-0.1.1.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apache-age-dijkstra 0.1.1
File Interpreter ABI Platform
apache_age_dijkstra-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.9 kB

Release files / apache-age-dijkstra-0.1.1.tar.gz

Download URL apache-age-dijkstra-0.1.1.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6af5e71facc12f724f38d2722e9c43e3e7e6376065012533d100b5e5211189ec
BLAKE2b-256 checksum
How to use checksums
cf954e7efaf06fc6f397076c6140c51c83b9ac23deab433f554553c60bc01594
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / apache_age_dijkstra-0.1.1-py3-none-any.whl

Download URL apache_age_dijkstra-0.1.1-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a89ab333cae44ee13e0854d538d556c1172c72b7a28bb4e6e6feb10ccde9f34
BLAKE2b-256 checksum
How to use checksums
e53e8df45f47d87ed0a32d3d74ff4ae120b62fb970c8872f42086ed3044b2cba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release history Release notifications | RSS feed

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page