2

I am creating a lot of nodes in neo4j using python's py2neo. I am using neo4j version 2 which has support for labels. I would like to add a label to the node I have created in batches. Is there a way to do that ?

a = batch.create(node(name='Alice'))

Now I would like to add the labels "Female", and "Human" to a.

gaurav.singharoy
  • 3,751
  • 4
  • 22
  • 25

1 Answers1

3

It's already possible to add labels within batches. Have a look in the docs here:

http://book.py2neo.org/en/latest/batches/#py2neo.neo4j.WriteBatch.add_labels

Nigel Small
  • 4,475
  • 1
  • 17
  • 15