Extension: Neobox

Maintained by: Nigel Small <nigel@py2neo.org>

Note

Neobox has been written to work on Linux and may not operate correctly - or at all - on other platforms.

Neobox is a command line tool and API for managing multiple Neo4j server installations (boxes), each running on its own unique port. The command line tool is installed as part of the py2neo setup script and can be used as follows:

$ neobox install my-box community 2.1.5
Created server instance 'my-box' configured on ports 47470 and 47471

$ neobox list
my-box

$ neobox start my-box
http://localhost:47476/

$ neobox stop my-box

$ neobox drop my-box

$ neobox remove my-box

All command line features are also available as API calls.

class py2neo.ext.neobox.Warehouse[source]

Container for Neo4j Box installations.

Parameters:home – Home directory for this warehouse (defaults to the path held in $NEOBOX_HOME if specified, otherwise $HOME/.neobox)
box(name)[source]

Fetch a named box. This box may or may not contain a Neo4j server installation.

Parameters:name – Name of the box to fetch.
Return type:Box
boxes()[source]

Fetch a list of all installed boxes.

Return type:generator
class py2neo.ext.neobox.Box[source]

Named container for a single Neo4j installation.

Parameters:
  • warehouse – The warehouse to which this box belongs.
  • name – The name of this box.
home

Base directory for this box. This directory may not exist.

install(edition, version)[source]

Install a Neo4j server in this box.

Parameters:
  • edition – Neo4j edition (‘community’ or ‘enterprise’)
  • version – Neo4j version (e.g. ‘2.1.5’)
Return type:

py2neo.server.GraphServer

remove(force=False)[source]

Remove any installed Neo4j server from this box. Running servers cannot be removed unless forced.

Parameters:forceTrue to remove server even if running.
rename(new_name)[source]

Rename this box.

Parameters:new_name – The new name for this box.
server

The py2neo.server.GraphServer installed in this box or None if this box is empty.