O'Reilly logo

Neo4j Cookbook by Ankur Goel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Accessing the embedded Neo4j from Python

Python is getting increasingly popular nowadays, and, in this recipe, we will learn how to connect to the Neo4j embedded graph server from the Python client.

Getting ready

Embedded Neo4j is an excellent binding module available in Python to access the Neo4j embedded database. The following steps describe the use of this module:

  1. Install the JPype Python module, as shown in the following command:
    $ sudo apt-get install python-jpype
    

    It can also be installed from the source available at http://sourceforge.net/projects/jpype/files/JPype/.

  2. Install Neo4j embedded using either pip or easy_install, as follows:
    $ pip install neo4j-embedded
    $ easy_install neo4j-embedded
    

How to do it...

Perform the following steps in order ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required