Skip to main content

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

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

License

Apache-2.0 License

Metadata

Release files for apache-age-dijkstra 0.2.0

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.2.0
File Size Uploaded
apache-age-dijkstra-0.2.0.tar.gz 9.0 kB Details

Built distribution (wheel)

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

Total release size: 18.5 kB

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

Download URL apache-age-dijkstra-0.2.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
422e019ca931161b5398aa84eb5921bcdbd645fb1498e360fe0f3a2965e326f6
BLAKE2b-256 checksum
How to use checksums
d88c7a8c3dd4aea6e710b8f189a57d5ade07238659a17be5bbb59ea9df130345
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.0-py3-none-any.whl

Download URL apache_age_dijkstra-0.2.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
faff581f52bedc70972eb72dffed2a403f5aaad9c0e30d731cc241eda280488d
BLAKE2b-256 checksum
How to use checksums
1ce6c04866ee315c6efdedff5f0ee7cfcc8d08389e87cd00468af6a92904dc04
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

This release

0.2.0 This release

2 release files

0.1.1

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