Skip to content

Files

This branch is 1 commit ahead of, 264 commits behind apache/age:master.

python

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jan 3, 2023
Jan 3, 2023
Jan 3, 2023
Nov 30, 2021
Jan 5, 2023
Jan 6, 2022
Jan 5, 2023
Jan 5, 2023
Jan 6, 2022
Jan 6, 2022

AGE AGType parser and driver support for Python

AGType parser and driver support for Apache AGE, graph extension for PostgreSQL.

Features

  • Unmarshal AGE result data(AGType) to Vertex, Edge, Path
  • Cypher query support for Psycopg2 PostreSQL driver (enables to use cypher queries directly)

Prerequisites

sudo apt-get update
sudo apt-get install python3-dev libpq-dev
git clone https://github.com/apache/age.git
cd age/drivers/python

Install required packages

pip install -r requirements.txt

Test

python -m unittest -v test_age_py.py
python -m unittest -v test_agtypes.py

Build from source

python setup.py install

Install from PyPi

pip install apache-age-python

For more information about Apache AGE

Check AGE loaded on your PostgreSQL

Connect to your containerized Postgres instance and then run the following commands:

# psql 
CREATE EXTENSION age;
LOAD 'age';
SET search_path = ag_catalog, "$user", public;

Usage

License

Apache-2.0 License