Skip to content

Commit

Permalink
Connecting to neo4j
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturOle committed Aug 27, 2024
1 parent 360c96a commit 5836776
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@

services:

database:
image: neo4j:5.23.0
container_name: neo4j
ports:
- "7474:7474"
- "7687:7687"


test:
build: .
container_name: ragger
Expand Down
14 changes: 13 additions & 1 deletion ragger/data_manager/communication/communication.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
from neo4j import GraphDatabase


class Comunicator:
pass
def __init__(self, uri, user, password):
self.driver = GraphDatabase.driver(uri, auth=(user, password))
self.driver.verify_connectivity()


if __name__ == "__main__":
uri = "neo4j://localhost:7687"
user = "neo4j"
password = "neo4j"

communicator = Comunicator(uri, user, password)
print("Connected to Neo4j")

0 comments on commit 5836776

Please sign in to comment.