neobolt.exceptions.CypherSyntaxError: Invalid input ':'

Hi all,

I'm new to neo4j, and I've been trying to get acquainted with the python driver. I've managed to create some nodes, and now I would like to update them with a new parameter. Essentially, I'd like to implement the following: https://medium.com/neo4j/5-tips-tricks-for-fast-batched-updates-of-graph-structures-with-neo4j-and-cypher-73c7f693c8cc

So I've managed to use :param in the browser interface to create a "batch" parameter, but when I try to run it using the neo4j python driver, I get the following:

import neo4j
uri = "bolt://xxx.xxx.xxx.xxx:7687"
driver = neo4j.GraphDatabase.driver(uri)
session = driver.session()
batch_statement = ':param {batch: [{name:"Alice",age:32},{name:"Bob",age:42}]}'
set_batch = session.run(batch_statement)

neobolt.exceptions.CypherSyntaxError: Invalid input ':': expected <init> (line 1, column 1 (offset: 0))
":param {batch: [{name:"Alice",age:32},{name:"Bob",age:42}]}"

Does anyone know what may be happening here? I think I'm failing to understand exactly what session.run() does...

You pass params to the driver in the session.run(statement, params)

see the api docs of the python driver: Neo4j Python Driver 5.4 — Neo4j Python Driver 5.4

The syntax you use is for Neo4j browser or cypher-shell.