Neo4jIt was said thatEmbeddedInPythonInGraph databaseModule, allowing Python to operate local files through graph database APIs to store graph structure data (similar to many libraries that support SQLite ). Today, Neo4j finally fulfilled its promise on the official blog and expressed its sorry for its repeated pass jumps.
First of all, we're really sorry. we have been saying that Python support for the embedded database is coming in "a few weeks" or "next month" for over half a year now, and so far, you have waited patiently, and you have waited in vain.
Let's take a look at the usage.
# Import the corresponding package from neo4j import GraphDatabase # create a local file-based graph database db = GraphDatabase ('/my/db/location') # store data with db. transaction: oscar = db. node (name = 'oscar wilde') jacob = db. node (name = 'Jacob ') # Create a relationship oscar. impressed_by_blogging_skills_of (jacob) # disable database db. shutdown ()
Currently, the latest version has been tested in CPython2.7.2 Windows and Linux, and works properly in Python2.6. You need to install JPype to build a bridge between Python and Java. For more details and instructions, see the official documentation of neo4j: docs.neo4j.org.