nxCypher
nxCypher is an openCypher graph query language implementation written in Python, for Python data structures. Originally forked from GrandCypher.
pip install nxcypher
You likely already know openCypher from the Neo4j Graph Database. Use it with your favorite graph libraries in Python!
Usage
Example Usage with NetworkX:
from nxcypher import NXCypher
import networkx as nx
NXCypher(nx.karate_club_graph()).run("""
MATCH (A)-[]->(B)
MATCH (B)-[]->(C)
WHERE A.club == "Mr. Hi"
RETURN A.club, B.club
""")
See examples.md for more!
Feature Parity
| Feature | Support |
|---|---|
Multiple MATCH clauses |
✅ |
WHERE-clause filtering on nodes |
✅ |
Anonymous -[]- edges |
✅ |
LIMIT |
✅ |
SKIP |
✅ |
Node/edge attributes with {} syntax |
✅ |
WHERE-clause filtering on edges |
✅ |
Named -[]- edges |
✅ |
Chained ()-[]->()-[]->() edges |
✅ |
Backwards ()<-[]-() edges |
✅ |
Anonymous () nodes |
✅ |
Undirected ()-[]-() edges |
✅ |
Boolean Arithmetic (AND/OR) |
✅ |
(:Type) node-labels |
✅ |
[:Type] edge-labels |
✅ |
DISTINCT |
✅ |
ORDER BY |
✅ |
IN |
✅ |
Aggregation functions (COUNT, SUM, MIN, MAX, AVG) |
✅ |
COUNT(*) aggregate |
✅ |
DISTINCT in aggregates (COUNT(DISTINCT x)) |
✅ |
COLLECT() aggregation |
✅ |
Aliasing of returned entities (return X as Y) |
✅ |
Negated edges (WHERE NOT (a)-->(b)) |
✅ |
OPTIONAL MATCH |
✅ |
Multiple independent OPTIONAL MATCH |
✅ |
WITH clause |
✅ |
UNWIND clause |
✅ |
Graph mutations (CREATE, SET, DELETE, DETACH DELETE) |
✅ |
REMOVE clause |
✅ |
MERGE clause with ON CREATE/ON MATCH |
✅ |
String functions (toLower, toUpper, trim) |
✅ |
List functions (size, head, tail) |
✅ |
Type functions (type, labels, keys) |
✅ |
CASE expressions (searched and simple) |
✅ |
UNION / UNION ALL |
✅ |
| List comprehensions | ✅ |
| ✅ = Supported | 🛣 = On Roadmap | 🥺 = Help Welcome | 🔴 = Not Planned |
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines, including the DCO sign-off requirement.
License
nxCypher is licensed under the Apache License 2.0.
This project implements the openCypher query language. Cypher is a registered trademark of Neo4j, Inc. This project is not affiliated with or endorsed by Neo4j, Inc.
Metadata
Release files for nxcypher 1.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nxcypher-1.1.4.tar.gz | 795.2 kB | Without provenance | Details for nxcypher-1.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nxcypher-1.1.4-py3-none-any.whl | Python 3 | none | any | Details for nxcypher-1.1.4-py3-none-any.whl |
Total release size: 1.0 MB
Release files / nxcypher-1.1.4.tar.gz
| Download URL | nxcypher-1.1.4.tar.gz |
|---|---|
| Size | 795.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a551ac2d2181b8bf32db5715eb47ece37bfbcd81d42f72fd68d20e075f8c30a
|
|
BLAKE2b-256 checksum How to use checksums |
421b0fd8a8fd793f3e1c636e0d51d4dba5b696ffe40b0de70704c104a68104e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.20
|
Release files / nxcypher-1.1.4-py3-none-any.whl
| Download URL | nxcypher-1.1.4-py3-none-any.whl |
|---|---|
| Size | 236.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d138f75a9b9427483a45a043dd3e634ca798e6103cca31fb1a1b7a287cd53b9d
|
|
BLAKE2b-256 checksum How to use checksums |
5c7cc9c70d4262aba06020af81442b11192ab7d182fa3c955ca695bc11ed0f16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.20
|
Security for nxcypher 1.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.