WIP.
Library to build Neo4j queries with special attention on Graph Data Science library calls.
It provides a DSL to write queries inspired in IGQL.
from py2gds.connection import Neo4JDriverConnection
from py2gds.dsl import Query
from py2gds.algorithm import AlgorithmType
graph_connection = Neo4JDriverConnection.create(
uri=f"{app_config.neo4j.scheme}://{app_config.neo4j.host}:{app_config.neo4j.port}",
user=app_config.neo4.user,
password=app_config.neo4j.password,
)
pages_rank = (Query.using(graph_connection)
.rank(algorithm=AlgorithmType.ArticleRank)
.projected_by(labels=("Page",), relationships=("LINKS",))
.run(log=True)
)
print(pages_rank)
pip install py2gds
If you want to write queries in Python like cypher's queries, better try: https://github.com/stellasia/pygds