Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Object-oriented Python library to interact with Neo4j standalone REST server

tag: 1.6.0

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 docs
Octocat-spinner-32 neo4jrestclient
Octocat-spinner-32 AUTHORS.txt
Octocat-spinner-32 CHANGES.txt
Octocat-spinner-32 LICENSE-GPL.txt
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 README.rst
Octocat-spinner-32 README.txt
Octocat-spinner-32 requirements.txt
Octocat-spinner-32 setup.py
README.rst

Neo4j Python REST Client

synopsis: Object-oriented Python library to interact with Neo4j standalone REST server.

The first objective of Neo4j Python REST Client is to make transparent for Python programmers the use of a local database through neo4j.py or a remote database thanks to Neo4j REST Server. So, the syntax of this API is fully compatible with neo4j.py. However, a new syntax is introduced in order to reach a more pythonic style.

Installation

Available throught Python Package Index:

$ pip install neo4jrestclient

Or:

$ easy_install neo4jrestclient

Getting started

The main class is GraphDatabase, exactly how in neo4j.py:

>>> from neo4jrestclient.client import GraphDatabase

>>> gdb = GraphDatabase("http://localhost:7474/db/data/")

Due to the syntax is fully compatible with neo4j.py, the next lines only show the commands added and its differences.

Creating a node:

>>> n = gdb.nodes.create()

# Equivalent to
>>> n = gdb.node()

Specify properties for new node:

>>> n = gdb.nodes.create(color="Red", widht=16, height=32)

Accessing properties:

>>> value = n['key'] # Get property value

>>> n['key'] = value # Set property value

Create relationship:

>>> n1.relationships.create("Knows", n2) # Usefull when the name of
                                         # relationship is stored in a variable

Specify properties for new relationships:

>>> n1.Knows(n2, since=123456789, introduced_at="Christmas party")

Documentation

For an extended and lates version of the documentation, please, visit the docs site:: http://readthedocs.org/docs/neo4j-rest-client/en/latest/

Something went wrong with that request. Please try again.