skillfed

graphframes-py

GraphFrames: Graph Processing Framework for Apache Spark

graphframes-py v0.12.1 1.3M downloads/30d#4,114 on PyPI1,201
Permissive license Apache 2.0 Active released

What it is and what it does

GraphFrames is a Python wrapper for the Scala GraphFrames library, enabling distributed graph processing on Apache Spark. It lets you build and analyze graphs at scale using familiar DataFrame-like APIs, supporting operations such as centrality calculations (PageRank), motif discovery, community detection, and graph traversals. The package works with both classic Spark and Spark-Connect, choosing the implementation automatically based on your session type.

The package itself is a thin Python layer—the heavy lifting happens in the JVM via Spark and GraphX. You need to supply your own Spark cluster or Spark-Connect server and ensure the JVM-core and GraphX dependencies are available. It's designed for developers working with network data, social graphs, knowledge graphs, or any large-scale graph problem that benefits from distributed computation.

Use it for:

  • Compute PageRank and other centrality metrics on large social networks or web graphs in a distributed setting.
  • Discover motifs and structural patterns in biological networks, citation graphs, or knowledge graphs.
  • Detect communities and clusters in large graphs to identify groups or sub-networks.
  • Perform graph traversals and connectivity analysis to find paths, reachability, or connected components.
  • Build recommendation systems or link-prediction models using graph algorithms on Spark.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

GraphFrames Python wrapper provides graph processing and analysis on Apache Spark, enabling operations like centrality metrics, motif finding, community detection, and traversals on distributed graph data.

Yes, if you have a Spark cluster or Spark-Connect server and need distributed graph processing. The package is actively maintained, permissively licensed, and has no known vulnerabilities. The main gotcha is the external JVM dependency—you cannot use this package standalone; it requires a working Spark environment. If you already have Spark and need graph algorithms at scale, it's a solid choice.

Install

graphframes-py on PyPI

pip

pip install graphframes-py

uv

uv add graphframes-py

poetry

poetry add graphframes-py

Installing graphframes-py

Before you install

Low install friction with a pure Python wheel. Actively maintained as of 2026-06-17 with recent commits. However, the package requires a separate JVM-core dependency and Apache Spark cluster or Spark-Connect server to function—this is a runtime requirement, not a packaging issue.

License in practice

Licensed under Apache 2.0 (permissive). You can use, modify, and distribute this package freely in commercial and private projects, provided you include the license notice.

Quickstart

pip install graphframes-py

from graphframes import GraphFrame

# Requires a Spark session and graph data (vertices, edges DataFrames)
graph = GraphFrame(vertices, edges)

Requires Apache Spark cluster or Spark-Connect server with JVM-core dependency installed; Python 3.10 or later; separate GraphX dependency may need manual setup when installing from local repository.

Verify before relying

  • Whether the package auto-resolves GraphX and other JVM dependencies when installed from PyPI (description notes manual setup may be needed for local installs).
  • Specific Spark version compatibility matrix beyond the general reference in documentation.
  • Whether Spark-Connect mode is the recommended path for new projects or if classic mode remains the default.

Package facts

License Apache 2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 58 days since the last release
Last repo commit
First released
Downloads 1,283,535/month — #4,114 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: graphframes_py-0.12.1-py3-none-any.whl

Keywords: pyspark, network-analysis, pagerank, pregel, graph

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Topic :: Database :: Front-EndsTopic :: Scientific/Engineering

Tags

graph processing sparknetwork analysis pysparkdistributed graph algorithmspagerank pregel sparkgraph clustering community detectionmotif finding graphsgraph traversal connectivitycentrality metrics spark
distributed-computinggraph-algorithmsspark-ecosystem

More Scientific/Engineering packages