Get Started What is a GraphDB? GraphDB vs RDBMS GraphDB vs NOSQL Language Drivers Cypher Cypher Basics Build a Recommendation Engine Cypher Refcard Data Modeling Graph Data Modeling Guidelines Working with Data Neo4j Browser Visualization Importing Data into Neo4j Graph… Learn More »
If you are a Pythonista, this guide provides an overview of options for connecting to Neo4j. While this guide is not comprehensive it will introduce the different drivers and link to the relevant resources.
You should be familiar with graph database concepts and the property graph model. You should have installed Neo4j and made yourself familiar with our Cypher Query language.
Neo4j from Python
Python is an excellent dynamic language, and we’re proud to say that Neo4j works well it. Python drivers were there all from the beginning and a strong and driving force for adopting Neo4j in many places.
Drivers for the different Python stacks enable you to use Neo4j from your familiar environment.
Many Pythonistas have invested a lot of time and love to develop all these drivers, so please if you use them provide feedback to the authors.
The Example Project
It is a small one page webapp for our movies database. The front-end is the same for all drivers, just the backends show you how to connect to Neo4j from the different languages and drivers.
Python and Neo4j are a well established combination, mainly thanks to the many contributors in the community.
For small apps it’s feasible to connect directly to Neo4j and execute the Cypher queries that you need to. We also have Django support for building bigger web applications, in Neo4jDjango and Neomodel.
This excellent article from Nigel demonstrates how to join in the fun.
Py2neo is a simple and pragmatic Python library that provides access to the popular graph database Neo4j via its HTTP-Apis.
It has comprehensive documentation and a lof related articles by its author.
Author: Javier De La Rosa
An Object Graph Mapper (OGM) also usable for Django for the Neo4j graph database.
- NeoModel on GitHub
- Author: Robin Edwards
Implements the Python DB API 2.0 for Neo4j, compatible with python 2.6, 2.7, 3.2 and 3.3 and Neo4j >= 2.0.0
- neo4jdb-python on GitHub
- Author: Jacob Hansson
neo4django is an Object Graph Mapper (OGM) for Django. Use familiar Django models and queries against Neo4j.
- neo4django on GitHub
- Author: Matt Luongo
Bulbs is an open-source Python persistence framework for graph databases and the first piece of a larger Web-development toolkit. It’s like an ORM for graphs.
- Bulbs on GitHub
- Author: James Thornton
Sign up to find out more about Neo4j's upcoming events & meetups.