neo4j_marshaller
neo4j_marshaller is a Python library that takes a Cypher Query, executes it, and returns the resultset as a JSON object.
The idea is to
- avoid the boiler-plate code that has to "interpret" the returned
BoltResultSetin-order to use the results - easily supply named parameters in the Cypher Query
get_one(): pick one row from returnedBoltResultSetand return it as an objectget_all(): treat theBoltResultSetand return it as an array
Here is the GitHub repo:
Here is the pip command to install it:
pip install neo4j-marshaller
Here’s a simple example of how you might use neo4j_marshaller:
from neo4j_marshaller import Neo4JMarshallerResource
import json, sys, os
if __name__ == "__main__":
email_address = os.environ['EMAIL_ADDRESS']
cypher_query = """
MATCH (user:ExplUser {name: $username})
RETURN user
"""
with Neo4JMarshallerResource() as nmr:
userJson = nmr.get_one(cypher_query, username=email_address)
json.dump(userJson, indent=2, fp=sys.stdout)
Metadata
Release files for neo4j-marshaller 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| neo4j_marshaller-0.0.1.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| neo4j_marshaller-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.4 kB
Release files / neo4j_marshaller-0.0.1.tar.gz
| Download URL | neo4j_marshaller-0.0.1.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1cb61ab50ea67961ab0357c2404058c7cc3708a22386e8bd8bef11ded953d44a
|
|
BLAKE2b-256 checksum How to use checksums |
b37caa58526bd3088e672498e70e23006e8a6619799721e91c8dc1154e8e94ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / neo4j_marshaller-0.0.1-py3-none-any.whl
| Download URL | neo4j_marshaller-0.0.1-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5af22851dbb5cf9438397fec8102e6636c1d23e1d441d4b4447df6692012fefb
|
|
BLAKE2b-256 checksum How to use checksums |
9c12a192722f4214843931d0d4a4588e6ff9f4877d225300c23e56232d554ff6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|