neo4j-contrib / py2neo

EOL! Py2neo is a comprehensive Neo4j driver library and toolkit for Python.
https://py2neo.org
Apache License 2.0
20 stars 8 forks source link

NodeMatcher Predicates #930

Closed chomezski closed 2 years ago

chomezski commented 2 years ago

Trying to use predicates with NodeMatcher()... am I doing something wrong here?

In [24]: nodes = NodeMatcher(neodb)

In [25]: nodes.match("Interface", ipv4=STARTS_WITH("192.168.240.170")).first()
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-25-22cdc9c394bd> in <module>
----> 1 nodes.match("Interface", ipv4=STARTS_WITH("192.168.240.170")).first()

NameError: name 'STARTS_WITH' is not defined
technige commented 2 years ago
from py2neo.matching import STARTS_WITH