Hi all

A quick note on the new command line additions to py2neo (which currently
aren't completely finialised but shouldn't change too much from here on
out).

---

usage: cypher.py [-h] [-u DATABASE_URI] [-d] [-j] [-g] query

Execute Cypher queries against a Neo4j database server and output the
results.

positional arguments:
  query            the Cypher query to execute

optional arguments:
  -h, --help       show this help message and exit
  -u DATABASE_URI  the URI of the source Neo4j database server
  -d               output all values in delimited format (default)
  -j               output all values as a single JSON array
  -g               output nodes and relationships in GEOFF format

---

usage: geoff.py [-h] [-u U] [-f F]

Import graph data from a GEOFF file into a Neo4j database.

optional arguments:
  -h, --help  show this help message and exit
  -u U        the URI of the destination Neo4j database server
  -f F        the GEOFF file to load

---

The latter script can also read from stdin which allows pipes to be built
to funnel data out of a db and back in again:

./cypher.py -g "START n=node(23) match (n)-[r]-(x)--(y) return n, x.name,
n, r, x, x.name, x.\`birth.date\`, y, y.name, r.\`marriage.date\`?" |
./geoff.py

Of course this example puts data back into the the same DB it reads it from
so isn't much use! Putting together more docs this week so will update soon.

Nige
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to