# What Are the Dependencies for Graphify? A Complete Guide to Mandatory and Optional Packages

> Discover Graphify dependencies. Learn about mandatory packages like NetworkX and NumPy, plus optional extras for databases, LLMs, and more. Get Graphify running smoothly.

- Repository: [Graphify Labs/graphify](https://github.com/Graphify-Labs/graphify)
- Tags: how-to-guide
- Published: 2026-07-19

---

**Graphify depends on NetworkX, NumPy, RapidFuzz, and a comprehensive suite of Tree-sitter parsers as mandatory requirements, with optional extras for databases, document processing, LLM providers, and multimedia handling.**

Graphify is a Python library developed by **Graphify-Labs** that transforms source code into queryable knowledge graphs. Understanding the dependencies for Graphify is essential for installation planning, as the project splits its requirements into lean core packages and feature-specific optional groups declared in [`pyproject.toml`](https://github.com/Graphify-Labs/graphify/blob/main/pyproject.toml).

## Mandatory Core Dependencies

The base installation of Graphify requires four categories of packages that provide graph algorithms, numerical computing, fuzzy matching, and multi-language parsing capabilities.

### NetworkX (>=3.4)

**NetworkX** provides the fundamental graph data structures and algorithms that power Graphify's knowledge representation. According to the Graphify-Labs/graphify source code, this library handles the construction and traversal of code dependency graphs in [`graphify/__init__.py`](https://github.com/Graphify-Labs/graphify/blob/main/graphify/__init__.py).

### NumPy (>=1.21)

**NumPy** enables high-performance array operations required for numerical computations within the graph analysis pipeline. The `>=1.21` constraint ensures compatibility with modern array broadcasting features used throughout the codebase.

### RapidFuzz (>=3.0)

**RapidFuzz** supplies fast fuzzy string matching capabilities, allowing Graphify to identify approximate matches between symbol names and references across different source files.

### Tree-sitter Language Parsers

Graphify includes a family of **Tree-sitter** parsers covering dozens of programming languages. These mandatory parsers include support for Python, JavaScript, TypeScript, Go, Rust, Java, Groovy, C, C++, Ruby, C#, Kotlin, Scala, PHP, Swift, Lua, Zig, PowerShell, Elixir, Objective-C, Julia, Verilog, Fortran, Bash, and JSON. These packages enable Abstract Syntax Tree (AST) construction within the `graphify/extractors/` directory.

## Optional Dependency Groups

Graphify organizes additional functionality into optional dependency groups under the `[project.optional-dependencies]` table in [`pyproject.toml`](https://github.com/Graphify-Labs/graphify/blob/main/pyproject.toml) (lines 50-84). Install these using `pip install graphifyy[<group>]` syntax.

### MCP and HTTP Transport

For Model Context Protocol (MCP) support and HTTP server capabilities, Graphify requires:
- `mcp` – The core MCP implementation
- `starlette>=1.3.1` – ASGI framework used by [`graphify/serve.py`](https://github.com/Graphify-Labs/graphify/blob/main/graphify/serve.py) for HTTP transport

### Database Connectors

Graphify supports multiple graph and relational database backends:
- `neo4j` – For Neo4j graph database integration
- `falkordb` – FalkorDB connector support
- `psycopg[binary]` – PostgreSQL binary driver for relational storage

### Document Processing

To parse non-code documents and convert them to graph nodes:
- `pypdf>=6.12.0` – PDF text extraction
- `markdownify` – Markdown to text conversion
- `python-docx` – Microsoft Word document handling
- `openpyxl` – Excel spreadsheet parsing

### File System and Visualization

Additional utilities include:
- `watchdog` – File system watching for live graph updates
- `matplotlib` – Graph visualization and plotting capabilities
- `numpy>=2.0` – Required specifically for Python 3.13+ when using visualization features

### Community Detection

The `graspologic` package provides advanced community detection algorithms, though this dependency is only available on **Python < 3.13**.

### Multimedia and Speech Processing

For audio and video processing capabilities:
- `faster-whisper` – Speech-to-text transcription (requires **Python >= 3.11**)
- `yt-dlp` – YouTube and media platform downloading

### LLM Provider Integrations

Graphify supports multiple large language model backends through optional packages:
- `openai` – OpenAI API and compatible endpoints (including Ollama and Kimi)
- `tiktoken` – Token counting for OpenAI and Gemini models
- `anthropic` – Claude API integration
- `boto3` – AWS Bedrock access

### Language-Specific Extras

Additional Tree-sitter parsers for specialized languages:
- `jieba` – Chinese text tokenization support
- `tree-sitter-sql` – SQL parsing capabilities
- `tree-sitter-pascal`, `tree-sitter-dm`, `tree-sitter-hcl` – Pascal, DM, and HCL language support

## Where Dependencies Are Declared

All **Graphify dependencies** are centrally managed in the [`pyproject.toml`](https://github.com/Graphify-Labs/graphify/blob/main/pyproject.toml) file at the repository root. Lines 13-43 define mandatory requirements, while lines 50-84 specify the optional dependency groups. The [`graphify/__init__.py`](https://github.com/Graphify-Labs/graphify/blob/main/graphify/__init__.py) file exposes the public API and registers CLI entry points (`graphify`, `graphify-mcp`).

## Installing Graphify with Specific Dependencies

To install only the core package with mandatory dependencies:

```bash
pip install graphifyy

```

To include specific features, use the extras syntax. For example, to install with Neo4j support and PDF processing:

```bash
pip install "graphifyy[neo4j,pdf]"

```

Multiple extras can be combined. This example installs database connectors, document handling, and LLM support:

```bash
pip install "graphifyy[neo4j,psycopg,documents,openai]"

```

After installation, verify the setup by building a graph from source code:

```python
from graphify import Graphify

# Initialize with project root

g = Graphify(root_path="my_project/")

# Build the knowledge graph using the installed parsers

g.build()

# Query relationships (requires appropriate backend if using LLM features)

result = g.query("What functions call `process_data`?")
print(result)

```

## How Dependencies Power Graphify's Architecture

The dependency structure directly maps to Graphify's internal architecture. The `graphify/extractors/` directory contains language-specific modules that rely on the Tree-sitter parser packages to ingest source code. NetworkX and NumPy operate within the core graph building logic to construct and analyze code relationships.

When using MCP transport features, the [`graphify/serve.py`](https://github.com/Graphify-Labs/graphify/blob/main/graphify/serve.py) module imports `starlette` to implement the ASGI HTTP server. Database connectors like `neo4j` and `psycopg` enable the persistence layer, while document processing packages extend the ingestion capabilities beyond raw source code.

## Summary

- **Graphify dependencies** split into mandatory core packages (NetworkX, NumPy, RapidFuzz, Tree-sitter) and optional feature groups.
- Mandatory packages enable multi-language code parsing and graph construction without additional installation size.
- Optional groups cover databases (Neo4j, PostgreSQL, FalkorDB), documents (PDF, Word, Excel), LLM providers (OpenAI, Anthropic, AWS), and multimedia (Whisper, yt-dlp).
- Install specific combinations using `pip install graphifyy[<group1>,<group2>]` syntax.
- All dependencies are declared in [`pyproject.toml`](https://github.com/Graphify-Labs/graphify/blob/main/pyproject.toml) lines 13-84, with architecture files like [`graphify/serve.py`](https://github.com/Graphify-Labs/graphify/blob/main/graphify/serve.py) and `graphify/extractors/` consuming these packages.

## Frequently Asked Questions

### Do I need all optional dependencies to use Graphify?

No. Graphify is designed with a minimal core installation. You only need to install optional dependencies when using specific features like Neo4j storage, PDF ingestion, or LLM querying. The base package handles source code parsing and basic graph operations without extras.

### What Python versions are supported by Graphify?

Graphify supports Python 3.9 through 3.13, though specific optional dependencies have version constraints. The `graspologic` package only works on Python < 3.13, while `faster-whisper` requires Python >= 3.11. The core mandatory dependencies work across all supported versions.

### Can I use Graphify without installing database drivers?

Yes. Database connectors like `neo4j`, `falkordb`, and `psycopg` are completely optional. Graphify stores graphs in memory using NetworkX by default. You only need database drivers if you want to persist or query graphs using external storage systems.

### How do I install Graphify with PDF support?

Install the PDF extra using `pip install "graphifyy[pdf]"` or combine it with other features like `pip install "graphifyy[pdf,neo4j]"`. This installs `pypdf>=6.12.0`, `markdownify`, `python-docx`, and `openpyxl`, enabling Graphify to parse PDFs, Word documents, Excel files, and Markdown into the knowledge graph.