Start building graph applications in Python instantly on FalkorDBLite with a managed, serverless experience, no ports, no config, just code.
pip install falkordblite
Highlights
- FalkorDBLite runs as an isolated sub-process with Unix socket communication, eliminating network latency and port configuration while preventing application crashes from affecting database stability.
- Migrate from local development to production clusters by changing a single line of code. The API remains identical between falkordblite and falkordb-py clients for seamless scaling.
- Perfect for CI/CD pipelines, Jupyter prototyping, and data science workflows where ephemeral graph instances need to spin up instantly without infrastructure overhead or admin privileges.
As developers, we love the “Day 0” experience where things just work.
In the relational database world, SQLite is the king of this experience. You don’t reach for Docker or set up a Postgres cluster just to prototype an app or run local tests. You just import a library.
For a long time, the graph database world lacked this equivalent. If you wanted to leverage connected data, for RAG, recommendation engines, or fraud detection, you usually had to start by standing up a dedicated server instance.
That friction is now gone, and why we’ve built FalkorDBLite.
What is FalkorDBLite?
FalkorDBLite provides the FalkorDB graph engine packaged as a Python library. But unlike typical embedded databases that run inside your application’s memory space (risking crashes if your app misbehaves, or vice versa), FalkorDBLite takes a smarter, somewhat safer approach.
When you import and initialize FalkorDBLite, it automatically forks a lightweight sub-process next to your application. This results in:
- No Network Overhead: Communication happens over Unix domain sockets, not TCP/IP. This means zero latency from network stacks and no open ports to manage or secure.
- Process Isolation: Because it runs as a sub-process, it does not share memory with your application. If your Python script hits a segmentation fault, your database process remains stable (and vice versa).
- The “Library” Feel: Despite this robust architecture, the user experience is identical to an embedded library. You don’t install a server. You don’t configure a daemon. You just pip install.
When Should You Use FalkorDBLite?
FalkorDBLite allows you to delay infrastructure decisions until you actually need to make them.
You should reach for FalkorDBLite when:
- CI/CD Pipelines: You want to spin up a fresh graph for integration tests and tear it down immediately after. The sub-process model is perfect for ephemeral test environments.
- Prototyping: You have a data hypothesis and want to test it in a Jupyter notebook without the hassle of Docker containers.
- Local Tools & CLIs: You are building a Python tool that needs to manage complex relationships on a user’s machine without requiring them to act as a database administrator.
- Data Science: You need to load data, run heavy graph algorithms, and extract results. The sub-process architecture ensures that heavy processing in the DB doesn’t block your Python application’s main thread.
Quick installation
pip install falkordblite
Now, let’s write some Python. Notice that we don’t define ports or hosts, the library handles the socket creation and process forking for us.
from falkordblite import FalkorDB
# 1. Initialize the database.
# This automatically spawns the FalkorDB engine sub-process
# and connects via a Unix socket.
db = FalkorDB(path='./my_local_graph.db')
# 2. Create a graph key
graph = db.select_graph("SocialNetwork")
# 3. Run a Cypher query to create data
create_query = """
CREATE (:Person {name: 'Alice', title: 'developer'})-[:KNOWS]->(:Person {name: 'Bob', title: 'data scientist'})
"""
graph.query(create_query)
# 4. Query the data back
match_query = """
MATCH (p1:Person)-[:KNOWS]->(p2:Person)
RETURN p1.name, p2.name
"""
result = graph.query(match_query)
# 5. Iterate results
for row in result.result_set:
print(f"{row[0]} knows {row[1]}")
# Output: Alice knows Bob
The "Ah-ha" moment
The biggest fear with “Lite” tools is the migration cliff. You build your prototype, it succeeds, and now you need to scale to a real cluster. Do you have to rewrite your code?
With FalkorDB, the answer is no.
The API for falkordblite is designed to mirror the standard falkordb-py client. To switch from the local Unix-socket based engine to a remote TCP-based cluster, all you need to do is change your initialization.
Step 1: Run FalkorDB Server
Spin up the full server (options listed below).
Step 2: Update your Python requirements
pip install falkordb
Step 3: Update one line of code.
- from falkordblite import FalkorDB
+ from falkordb import FalkorDB
# INSTEAD OF: spawning a sub-process via file path
# WE DO: connect to a running server via TCP
- db = FalkorDB(path='./my_local_graph.db')
+ db = FalkorDB(host='localhost', port=6379)
# The rest of your logic, graph selection, query structure,
# and result parsing, remains 100% identical.
graph = db.select_graph("SocialNetwork")
graph.query("MATCH (n) RETURN count(n)")
The Full FalkorDB Ecosystem
When you are ready to move from the local sub-process to a scalable architecture, the FalkorDB graph ecosystem is ready:
- Self-Hosted (Open Source): Access the core engine code on the FalkorDB GitHub Repository.
- Docker: The standard way to run a production instance (FalkorDB Docker Hub):
docker run -p 6379:6379 -it –rm falkordb/falkordb - Managed Cloud: For zero-maintenance, high-availability hosting, use FalkorDB Cloud.
Next steps
FalkorDBLite gives you the best of both worlds: the isolation and stability of a separate database process, with the ease of use and zero-configuration of an embedded library. Start building today without the Ops overhead.
Happy graphing!
FAQ
How does FalkorDBLite differ from traditional embedded databases?
FalkorDBLite forks a lightweight sub-process instead of sharing memory space, providing process isolation that prevents crashes from cascading between your app and database.
Can I migrate FalkorDBLite code to production without rewrites?
Yes, the API mirrors falkordb-py exactly. Change your import statement and connection parameters from file path to host/port, your queries and logic remain unchanged.
What are the best use cases for FalkorDBLite versus FalkorDB server?
Use FalkorDBLite for integration tests, local prototyping, CLI tools, and data science notebooks. Switch to FalkorDB server for multi-tenant production workloads and distributed systems.
References and citations
- FalkorDBLite Official Documentation – Comprehensive guide to installation, configuration, and usage patterns for the embedded Python graph database interface.
- FalkorDBLite GitHub Repository – Open-source implementation providing self-contained Redis server with FalkorDB module for local development and testing.
- FalkorDB Docker Hub – Production-ready containerized deployment option for scaling beyond embedded instances to distributed graph database clusters.
- FalkorDB Cloud Platform – Managed, high-availability hosting service eliminating operational overhead for production graph database workloads.
- FalkorDB Core Engine Repository – Open-source graph database engine powering both FalkorDBLite and server deployments with GraphBLAS-accelerated query execution.
- FalkorDB Client Libraries – Language-specific SDKs including falkordb-py, falkordb-ts, jfalkordb, and falkordb-rs for polyglot development environments.
- Cypher Query Language Reference – OpenCypher syntax documentation for pattern matching, graph traversal, and relationship queries in FalkorDB
- Knowledge Graphs vs Vector Databases – Technical comparison of graph-based and vector-based approaches for GraphRAG, recommendation systems, and complex query answering.
- FalkorDBLite Official Documentation – Comprehensive guide to installation, configuration, and usage patterns for the embedded Python graph database interface.