Neo4J Graph database

Thanks for Downloading Neo4j - Neo4j Graph Database Platform

Windows (zip)

 
neo4j2-2
  1. If it is not already installed, get OpenJDK 8 or Oracle Java 8, recommended for Neo4j 3.0.x Version 7 is recommended for releases prior to 2.3.0.
  2. Find the zip file you just downloaded and right-click, extract all.
  3. Place the extracted files in a permanent home on your server, for example D:\neo4j\. The top level directory is referred to as NEO4J_HOME.
    • To run Neo4j as a console application, use:
      <NEO4J_HOME>\bin\neo4j console
    • To install Neo4j as a service use:
      <NEO4J_HOME>\bin\neo4j install-service.
    • For additional commands and to learn about the Windows PowerShell module included in the Zip file, see the Windows installation documentation.
  4. Visit http://localhost:7474 in your web browser.
  5. Connect using the username 'neo4j' with default password 'neo4j'. You'll then be prompted to change the password.

Neo4j Operations Manual: Windows installation →


Desktop UI

Download Desktop

https://neo4j.com/download/neo4j-desktop

When you register, you will be given an Activation Key

Mr Lai - Activation Key: Already used.

eyJhbGciOiJQUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6Ii4rQC4rIiwiZ29vZ2xlQW5hbHl0aWNzSWQiOiI2NDYzNjUzMi4xNjE4NjI5ODc3IiwibWl4cGFuZWxJZCI6IjE3OGRkZGNlNTRjMzk5LTAzNGFlZDg4NWMzZmZlLTNmMzU2Yi0xNDQwMDAtMTc4ZGRkY2U1NGQ2MDYiLCJtaXhwYW5lbFByb2plY3RJZCI6IjRiZmIyNDE0YWI5NzNjNzQxYjZmMDY3YmYwNmQ1NTc1Iiwib3JnIjoiLioiLCJwdWIiOiJuZW80ai5jb20iLCJyZWciOiIgIiwic3ViIjoibmVvNGotZGVza3RvcCIsImV4cCI6MTY1MDE2NjI1OCwidmVyIjoiKiIsImlzcyI6Im5lbzRqLmNvbSIsIm5iZiI6MTYxODYzMDI1OCwiaWF0IjoxNjE4NjMwMjU4LCJqdGkiOiJkcjdYQzhsQW0ifQ.Hjwf4CtxWADBnBokiGD_ZpFntm1B0iV2NVpxWdKT5NQinD6kJss00dkwVMdgBu2ge4jxEhZSIUX4uMXjWarJDqJho1pe_VKCrN7xsoDMBgUogMD0AxedZqAbExnQ9sIQJUmQJ04qzHQieHK2V3DnzfzBfeZbCW-dSaJftgfAAHpliaAcYZhB1oWCSl-3MRU1_ueYY-0HxJjwSRdITC9dCSXZ4er547bLVhCBPDvw3CWlDFZLlSJcKbDIs5SbfYfcHq8jm9KQGPjopnqyWGdYvQ8aJzWfTRDXNDxQQXO4B04Rz2Yr7gDwYlyFGDIlGV3dLUvF697hgqqcMzcgwjzd0g



Python API's


pip install neo4j==4.2.1

Sample Code:
from neo4j import GraphDatabase

driver = GraphDatabase.driver("neo4j://localhost:7687", auth=("neo4j", "password"))

def add_friend(tx, name, friend_name):
    tx.run("MERGE (a:Person {name: $name}) "
           "MERGE (a)-[:KNOWS]->(friend:Person {name: $friend_name})",
           name=name, friend_name=friend_name)

def print_friends(tx, name):
    for record in tx.run("MATCH (a:Person)-[:KNOWS]->(friend) WHERE a.name = $name "
                         "RETURN friend.name ORDER BY friend.name", name=name):
        print(record["friend.name"])

with driver.session() as session:
    session.write_transaction(add_friend, "Arthur", "Guinevere")
    session.write_transaction(add_friend, "Arthur", "Lancelot")
    session.write_transaction(add_friend, "Arthur", "Merlin")
    session.read_transaction(print_friends, "Arthur")

driver.close()

How to query Neo4j from Python



Comments