agensgraph

A Python driver for Agensgraph


Keywords
postgres, opencypher, postgresql, psycopg2-extension, python3, sql
License
MIT
Install
pip install agensgraph==0.0.2

Documentation

Agensgraph python driver

A psycopg2 extension to use AgensGraph with Python.

Documentation

Go to Psycopg's documentation for documentation about the Python interface and to AgensGraph documentation for AgensSQL. If you want to learn more about Cypher, I recommend you to go to Neo4j's documentation.

How to

import agensgraph

conn = agensgraph.connect("dbname=iomed")  # Equivalent to psycopg2.connect
cur = conn.cursor()
cur.execute("SET graph_path=snomed;")

cur.execute("MATCH (a)-[r]->(b) RETURN a,r,b LIMIT 10;")
result = cur.fetchall()

Copyright © 2017, IOMED Medical Solutions S.L.