Skip to main content

The portable graph processing and algorithms library

Project description

IbisGraph

Under development!

Tests and Code Styledeploy-docsUpload Python Package

IbisGraph logo

Idea

IbisGraph brings graph processing capabilities to your data warehouse or lake house by implementing the Pregel computation model on top of Ibis. This means you can perform graph analytics directly where your data lives, without moving it to specialized graph databases or in-memory systems.

Key benefits:

  • Process graph data in your existing data infrastructure
  • Scale with your warehouse/lake resources
  • Maintain data governance and security
  • Leverage SQL engine optimizations

Supported backends include:

  • DuckDB
  • PostgreSQL
  • SQLite
  • Snowflake
  • BigQuery
  • Apache Spark
  • And many others supported by Ibis

Quick Start

Install IbisGraph using pip:

pip install ibisgraph

You'll also need to install the appropriate Ibis backend. For example:

# For DuckDB
pip install "ibis-framework[duckdb]"

# For PostgreSQL
pip install "ibis-framework[postgres]"

# For Snowflake
pip install "ibis-framework[snowflake]"

Basic usage:

import ibis
import ibisgraph as ig

# Connect to your database
conn = ibis.duckdb.connect()

# Create a graph
graph = ig.Graph(nodes_table, edges_table)

# Run algorithms
pagerank = ig.centrality.pagerank(graph)
communities = ig.clustering.label_propagation(graph)
similarities = ig.similarity.node_similarity(graph)

For more detailed examples, check our documentation.

FAQ

Is it a replacement for graph libraries like NetworkX or IGraph?

  • No, IbisGraph is not a replacement for traditional graph libraries. While it implements graph algorithms using Pregel (which can be expressed in SQL), it will generally be slower than specialized implementations. Its value comes from being able to process graph data where it already lives.

Will it work on Databricks, Snowflake, PostgreSQL, etc.?

Why Pregel?

  • Pregel operations can be naturally expressed using SQL operations, making it ideal for implementing graph algorithms in data warehouses and lakes.

Is it better than GraphFrames for PySpark users?

  • As a GraphFrames committer, I can say that GraphFrames algorithms are generally better optimized for Apache Spark. However, IbisGraph provides a more Pythonic API and doesn't require JVM configuration.

When should I use IbisGraph?

  • Use IbisGraph when you need to process connected data stored in a database, datalake, or warehouse system without moving it out. While algorithms may run slower compared to specialized tools like Neo4j, the main advantage is processing data in place.

Features and Roadmap

Implemented:

  • Graph abstraction using Ibis Tables
  • Degree calculations (in/out/total)
  • Jaccard similarity index
  • Pregel computation framework
  • PageRank algorithm
  • Shortest Paths
  • Label Propagation

Coming soon:

  • Weakly Connected Components
  • Strongly Connected Components
  • Attribute Propagation
  • Random Walks
  • Node2vec
  • Gremlin support
  • OpenCypher support
  • The feature you will suggest

Contributing

We welcome contributions! Here's how to get started:

Development Setup

  1. Clone the repository:
git clone https://github.com/SemyonSinchenko/ibisgraph.git
cd ibisgraph
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # or `venv\Scripts\activate` on Windows
  1. Install development dependencies:
uv sync --all-groups

Development Standards

We use:

  • ruff for linting and formatting
  • pytest for testing
  • uv for dependency management
  • DuckDB for testing

Development Process

  1. Pick an Issue

    • Check existing issues or create a new one
    • Comment on the issue you want to work on
  2. Fork & Branch

    • Fork the repository
    • Create a feature branch
  3. Development

    • Write tests first
    • Implement your changes
    • Run tests: pytest
    • Run linter: ruff check .
    • Format code: ruff format .
  4. Submit PR

    • Create a Pull Request
    • Wait for review
    • Address feedback

Project Philosophy

IbisGraph follows the Benevolent Dictator governance model. While we welcome all contributions, final decisions rest with the project maintainer to ensure consistent direction.

Inspirations

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ibisgraph-0.0.2.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ibisgraph-0.0.2-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file ibisgraph-0.0.2.tar.gz.

File metadata

  • Download URL: ibisgraph-0.0.2.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ibisgraph-0.0.2.tar.gz
Algorithm Hash digest
SHA256 64e626f63d28e762aa66421ee79b9bdfd15de3bea74e747042dd034c46b7a230
MD5 16ffe3e8813a641d31c0cedd6355ad08
BLAKE2b-256 cd921c690c68d6270f27d79c669ea0ad6d9b9558122d38a4bb382be1dc11e724

See more details on using hashes here.

Provenance

The following attestation bundles were made for ibisgraph-0.0.2.tar.gz:

Publisher: python-publish.yml on SemyonSinchenko/ibisgraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ibisgraph-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: ibisgraph-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ibisgraph-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0c66cb3747de9ba71917666e3c2ca1aa21b0ab95076656af130e9ae86a5ecb8f
MD5 1af0b87b951a1db89c7dd4237723a9fe
BLAKE2b-256 a5e22e379abd171644363c76bfdec23f60d381eb9e8f18d3c28fb8e1e5aa96cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for ibisgraph-0.0.2-py3-none-any.whl:

Publisher: python-publish.yml on SemyonSinchenko/ibisgraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page