Implement Shortest Path (Dijkstra) with Apache AGE
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.
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
- Shortest Path implemented using dijkstra algorithm
- Used Apache AGE graph database
Requirements
- Python 3.9 or higher
- This module runs on psycopg2 and antlr4-python3
sudo apt-get update
sudo apt-get install python3-dev libpq-dev
pip install --no-binary :all: psycopg2
pip install antlr4-python3-runtime==4.9.3
Install via PIP
pip install apache-age-dijkstra
Build from Source
git clone https://github.com/Munmud/apache-age-dijkstra
cd apache-age-python
python setup.py install
Import
from age_dijkstra import Age_Dijkstra
Making connection to postgresql (when using this docker reepository)
con = Age_Dijkstra()
con.connect(
host="localhost", # default is "172.17.0.2"
port="5430", # default is "5432"
dbname="postgresDB", # default is "postgres"
user="postgresUser", # default is "postgres"
password="postgresPW", # default is "agens"
printMessage = True # default is False
)
For more information about Apache AGE
- Apache Incubator Age: https://age.apache.org/
- Github: https://github.com/apache/incubator-age
- Documentation: https://age.incubator.apache.org/docs/
- apache-age-dijkstra GitHub: https://github.com/Munmud/apache-age-dijkstra
- apache-age-python GitHub: https://github.com/rhizome-ai/apache-age-python
License
Metadata
Release files for apache-age-dijkstra 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| apache-age-dijkstra-0.2.1.tar.gz | 9.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| apache_age_dijkstra-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.6 kB
Release files / apache-age-dijkstra-0.2.1.tar.gz
| Download URL | apache-age-dijkstra-0.2.1.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9512c1aa99919055f967bd58ad510f2851300fe1c4b003621e7a9532927040ea
|
|
BLAKE2b-256 checksum How to use checksums |
1b644ac64f44e40ea1a8e87df92ac09578cb546b7ed9a10f174f2d90909b42a5
|
| 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.2.1-py3-none-any.whl
| Download URL | apache_age_dijkstra-0.2.1-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66822d80ea48a35ceb86adfd40d548ffbcf77eb6c8bf98c63476dd81047d882f
|
|
BLAKE2b-256 checksum How to use checksums |
048fe36a311000c65473424f3bc34f1891fb54653c6b5f266e88d07231d22767
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|