Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 75 lines (42 sloc) 1.913 kb
50c5921 @versae Adding new README file and setup.py files.
versae authored
1 Neo4j Python REST Client
2 ========================
3
161446b @versae Updating documentation and README files
versae authored
4 :synopsis: Object-oriented Python library to interact with Neo4j standalone REST server.
50c5921 @versae Adding new README file and setup.py files.
versae authored
5
6 The first objective of Neo4j Python REST Client is to make transparent for
7 Python programmers the use of a local database through neo4j.py_ or a remote
8 database thanks to Neo4j REST Server. So, the syntax of this API is fully
9 compatible with neo4j.py. However, a new syntax is introduced in order to
10 reach a more pythonic style.
11
12
13 Installation
14 ------------
15
16 Available throught Python Package Index::
17
18 $ pip install neo4jrestclient
19
20 Or::
21
22 $ easy_install neo4jrestclient
23
24
25 Getting started
26 ---------------
27
28 The main class is *GraphDatabase*, exactly how in neo4j.py_::
29
04f2dfb @versae Fixing the httplib2 import error during installing
versae authored
30 >>> from neo4jrestclient.client import GraphDatabase
50c5921 @versae Adding new README file and setup.py files.
versae authored
31
32 >>> gdb = GraphDatabase("http://localhost:7474/db/data/")
33
34 Due to the syntax is fully compatible with neo4j.py_, the next lines only show
35 the commands added and its differences.
36
37 Creating a node::
38
39 >>> n = gdb.nodes.create()
40
41 # Equivalent to
42 >>> n = gdb.node()
43
44 Specify properties for new node::
45
46 >>> n = gdb.nodes.create(color="Red", widht=16, height=32)
47
48 Accessing properties::
49
50 >>> value = n['key'] # Get property value
51
52 >>> n['key'] = value # Set property value
53
54 Create relationship::
55
56 >>> n1.relationships.create("Knows", n2) # Usefull when the name of
57 # relationship is stored in a variable
58
59 Specify properties for new relationships::
60
61 >>> n1.Knows(n2, since=123456789, introduced_at="Christmas party")
62
63
161446b @versae Updating documentation and README files
versae authored
64 Documentation
65 -------------
50c5921 @versae Adding new README file and setup.py files.
versae authored
66
161446b @versae Updating documentation and README files
versae authored
67 For an extended and lates version of the documentation, please, visit the
68 docs_ site:: http://readthedocs.org/docs/neo4j-rest-client/en/latest/
1150e34 @versae Adding initial documentacion for transactions.
versae authored
69
70
50c5921 @versae Adding new README file and setup.py files.
versae authored
71
72 .. _neo4j.py: http://components.neo4j.org/neo4j.py/
16c341c @mhluongo Updated the README to point to the new index DSL. It probably needs more...
mhluongo authored
73 .. _lucene-querybuilder: http://github.com/scholrly/lucene-querybuilder
161446b @versae Updating documentation and README files
versae authored
74 .. _docs: http://readthedocs.org/docs/neo4j-rest-client/en/latest/
Something went wrong with that request. Please try again.