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 ...

Get Neo4j Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.