Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

headsrooms/py2gds

Repository files navigation

py2gds

PyPI codecov DeepSource

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.

Example

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)

Install

pip install py2gds

Alternatives

If you want to write queries in Python like cypher's queries, better try: https://github.com/stellasia/pygds

About

Library to build Neo4j queries with special attention on Graph Data Science library calls.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages