3. What's new?
●
Cypher transactions
●
Label support
●
Schema index support (but not constraints)
●
Better Unicode support
●
Improved streaming for Cypher and batches
●
Implicit authentication
py2neo 1.6
@technige
7. Node Labels
Node.add_labels(*labels)
Add one or more labels to this node.
>>> from py2neo import neo4j, node
>>> graph_db = neo4j.GraphDatabaseService()
>>> alice, = graph_db.create(node(name="Alice"))
>>> alice.add_labels("female", "human")
py2neo 1.6
@technige
8. Node Labels
Node.remove_labels(*labels)
Remove one or more labels from this node.
Node.get_labels()
Fetch all labels associated with this node.
GraphDatabaseService.find(label, property_key=None, property_value=None)
Iterate through a set of labelled nodes,
optionally filtering by property key and value.
py2neo 1.6
@technige
9. Neotool Shell
$ neotool shell -U arthur -W excalibur -H camelot
Neotool Shell (py2neo/1.6.1 Python/2.7.3-final-0)
Copyright 2013, Nigel Small
camelot:7474/cypher> MATCH (a) RETURN a LIMIT 3
a
---------------------(1 {"name":"Alice"})
(2 {"name":"Bob"})
(3 {"name":"Carol"})
(3 rows)
py2neo 1.6
@technige