API: Servers

Functions & Classes


This module has been designed to work on Linux and may not operate correctly - or at all - on other platforms.

The server module provides classes for downloading and working with Neo4j server installations.

py2neo.server.dist_name(edition, version)[source]

Get the full Neo4j distribution name for the given edition and version, e.g. 'neo4j-community-2.1.5'.

py2neo.server.dist_archive_name(edition, version)[source]

Get the full Neo4j archive name for the given edition and version, e.g. 'neo4j-community-2.1.5-unix.tar.gz'.

py2neo.server.download(edition, version, path='.')[source]

Download the Neo4j server archive for the given edition and version. The download URI is built using the value in the environment variable NEO4J_DIST as a base or http://dist.neo4j.org/ if this is not set.

class py2neo.server.GraphServer(home='.')[source]

Represents a Neo4j server installation on disk. If no path is supplied to the constructor, the value is taken from the NEO4J_HOME environment variable. If this is not set, the current directory is assumed.


Server configuration read from Java properties files. This is returned in a (slightly modified) SafeConfigParser instance and can be queried as per the standard library version of this class:

>>> from py2neo.server import GraphServer
>>> server = GraphServer("/home/nigel/opt/neo4j")
>>> server.conf.get("neo4j-server", "org.neo4j.server.webadmin.data.uri")

The graph exposed by this server.

home = None

The base directory of this server installation.


Dictionary of server information.


The PID of the current executing process for this server,


Reload configuration from properties files.


Restart the server.


The file name of the control script for this server installation.


The service root exposed by this server.


Start the server.

Return type:py2neo.server.GraphServerProcess

Stop the server.


The store for this server.

Return type:py2neo.store.GraphStore
class py2neo.server.GraphServerProcess(server, service_root, **kwargs)[source]

A Neo4j server process.


The graph exposed by this server process.

Return type:py2neo.Graph
jvm_arguments = None

The JVM arguments with which this process was started.

pid = None

The PID of this process.

server = None

The server installation behind this process.

service_root = None

The service root exposed by this server process.


Stop this server process.

Command Line

To download a Neo4j server distribution, use the neoget command line tool:

$ neoget community 2.1.5