6. neokit – Command Line Toolkit for Neo4j

Neokit is a standalone module for managing one or more Neo4j server installations. The Neokit classes may be used programmatically but will generally be invoked via the command line interface. If Neokit has been installed as part of the Py2neo package, the command line tool will be available as neokit; otherwise, it can be called as a Python module: python -m neokit.

6.1. Command Line Usage

6.1.1. Installing a Neo4j archive

$ neokit install 3.0

6.2. API

class neokit.GraphServer(home=None)[source]

A Neo4j server installation.

auth_enabled

Settable boolean property for enabling and disabling auth on this server.

config(key, default=None)[source]

Retrieve the value of a configuration item.

Parameters:
  • key
  • default
Returns:

control_script

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

delete_store(force=False)[source]

Delete the store directory for this server.

Parameters:force
http_port

The port on which this server expects HTTP communication.

http_uri

The full HTTP URI for this server.

info(key)[source]

Look up an item of server information from a running server.

Parameters:key – the key of the item to look up
restart()[source]

Restart the server.

running()[source]

The PID of the current executing process for this server.

set_config(key, value)[source]

Update a single configuration value.

Parameters:
  • key
  • value
start()[source]

Start the server.

stop()[source]

Stop the server.

store_path

The location of the graph database store on disk.

update_config(properties)[source]

Update multiple configuration values.

Parameters:properties
update_password(user, password, new_password)[source]

Update the password for this server.

Parameters:
  • user
  • password
  • new_password
Returns:

class neokit.Package(edition=None, version=None)[source]

Represents a Neo4j archive.

download(path=’.’, overwrite=False)[source]

Download a Neo4j distribution to the specified path.

Parameters:
  • path
  • overwrite
Returns:

the name of the downloaded file

key

The unique key that identifies the archive, e.g. community-2.3.2.

name

The full name of the archive file, e.g. neo4j-community-2.3.2-unix.tar.gz.

uri

The URI from which this archive may be downloaded, e.g. http://dist.neo4j.org/neo4j-community-2.3.2-unix.tar.gz.

exception neokit.Unauthorized[source]

Raised when auth fails.

class neokit.Warehouse(home=None)[source]

A local storage area for Neo4j installations.

directory()[source]

Fetch a dictionary of GraphServer objects, keyed by name, for all available Neo4j installations.

get(name)[source]

Obtain a Neo4j installation by name.

Parameters:name
Returns:
install(name, edition=None, version=None)[source]

Install Neo4j.

Parameters:
  • name
  • edition
  • version
Returns:

rename(name, new_name)[source]

Rename a Neo4j installation.

Parameters:
  • name
  • new_name
Returns:

uninstall(name)[source]

Remove a Neo4j installation.

Parameters:name
Returns: