This project demonstrates how to use Python within a Jupyter Notebook environment to interact with Neo4j, a popular graph database. In this project, we create a simple social media network model using Python classes and then interact with a Neo4j database to represent and query this model.
- Python
- Jupyter Notebook
- Neo4j
- py2neo library
- Install Python, Jupyter Notebook, and Neo4j on your system.
- Install the py2neo library using
pip install py2neo
. - Clone this repository to your local machine.
- Open the Jupyter Notebook file (
notebook.ipynb
) in your Jupyter environment.
- Import the required modules and establish a connection to Neo4j.
- Create classes for User, Post, and SocialMediaPlatform.
- Create instances of users, social media platforms, and posts.
- Create nodes for social media platforms, users, and posts in the Neo4j database.
- Establish relationships between users and platforms, and users and posts.
- Execute queries to retrieve information from the Neo4j database.
This project serves as a practical demonstration of using Python with Jupyter Notebook for interacting with a Neo4j graph database. Feel free to explore and expand upon the provided codebase to suit your specific requirements.
For more information, refer to the official documentation of Neo4j and py2neo.