Cypher magic for IPython
Project description
cypher magic
Based on the code from https://github.com/innovationOUtside/cypher_magic.git but now more complete .
pip install --upgrade git+https://github.com/petehughes/cypher_magic.git
Load the magic with:
%load_ext cypher_magic
The magic allows you to run Cypher commands against the connected database using default credentials
You can set the host name of the neo4j using the -s
/--server
variable. default is localhost
You can set the username with the -u
/--userName
variable. default is neo4j
You can change the password with the -p
/--password
variable.
the -q
flag suppresses the cell output.
the -o
/--output
set the output type:
default
: pandas
dataframe
raw
: response from the py2neo
table
,
matrix
- requires sympy
%cypher -r
%cypher -q -p password -u neo4j -s localhost
Call as line magic %cypher
or block magic: %%cypher
p = %cypher -o table MATCH (p:Person) RETURN p.name AS name
or
%%cypher -o table
MATCH (p:Person)
RETURN p.name AS name
the magic will return a pandas
dataframe by default. Other return formats, set using the -o
/--output
parameter, include table
and matrix
(the latter requires sympy
to be installed).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for magic_cypher-0.9.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e97b933df5b86a0ab5cb6003a1b530d91a1c28d8c8078ff18ab75704204ba729 |
|
MD5 | aa2840968b1b251f063f9b614536e08d |
|
BLAKE2b-256 | 7aadb8874f1a44c9b042e484dbe0938a9b1390cd76813ef3f4227ea65e10a7dc |