
Build a Python web app with Flask and Neo4j, focusing on a graph database to power a blog with social features, including user registration, posting, and social recommendations.
Meet the author, a data scientist with economics and mathematics training from Louisiana State University and a statistics master's from UT Austin, showcasing neo4j and flask open source work.
Download and install Neo4j community edition, choose the correct platform (Windows, Mac, or Linux), then disable authentication, start the server, and access the graph store at localhost:7474.
Explore how Neo4j models data as nodes and relationships with properties, using node labels and relationship types, and contrast it with relational tables, then preview querying with cipher.
Learn cypher basics: use the match clause to pattern nodes and relationships, apply node labels and relationship types, assign identifiers, return results, and collect movies per person.
Learn to create and use Python virtual environments to isolate project packages, activate the environment, and install Flask, py2neo, passlib, and bcrypt for a Flask-neo4j project.
Install and set up PyCharm, choosing the free community edition for this project. Configure the Python interpreter from the virtual environment and create a new pure Python project in PyCharm.
Organize a Flask project into the conventional Flask structure by creating a blog package with views and models, importing app, and running from run.py to serve on localhost:5000.
Learn how to pass Python variables to Flask templates with render_template, set up a templates directory, and render strings, lists, and lists of dictionaries in HTML.
Learn how Flask views handle get and post requests, use the request object with forms, and render templates; explore dynamic urls with route variables and access values in the view.
Learn how to create and connect nodes and relationships in Neo4j using py2neo, including defining labels, setting properties, and querying the graph.
Use py2neo to manage nodes with three approaches: create new nodes with the node syntax, merge one to find or create by name, and find one to retrieve existing nodes.
Explore merging relationships in a Neo4j graph by importing nodes, creating a like relationship between Nikole and Kingfish, and using graph create unique to avoid duplicates.
Explore Cypher queries in a Flask and Neo4j workflow by deleting and reimporting a movie graph, matching producers, and returning names and titles for display in templates.
Write parameterised Cypher queries by passing movie title parameters in curly braces, then execute with a parameter dictionary to return actor names and prevent injection.
Explains graph versus tabular Cypher results in Neo4j, showing how returning entire node entities yields graph results while selecting properties creates tabular outputs.
Apply uniqueness constraints on user name, post id, and tag name by creating constraints on node label property pairs at application startup, producing indexes for efficient lookups.
Register a user by linking the register button to a Flask view that handles get and post requests, renders the register form, and reads username and password from request.form.
Finish implementing user registration by defining a user class with find and register methods using graph to locate and create user nodes, encrypting passwords, flashing messages, and redirecting to login.
Learn how to log in a user in a Flask and Neo4j app by validating username and password against stored user nodes, using get and post, sessions, and redirects.
Implement adding posts in a Flask and Neo4j app. Create a post node with title, text, and timestamps after login, link it to the user, and associate tags.
Finish add post flow in a Flask app by retrieving title, tags, and text from the form, validating input, linking the user via session, and saving post to the database.
Write a cypher query to display today's most recent posts, including user and tags, and index the date property.
learn how to display today's most recent posts by querying Neo4j for them, passing posts to the template, and rendering title, username, date, tags, and text.
implement a like post feature in a flask and neo4j app, including a post endpoint, session username, and creating a unique like relationship.
Finish implementing the like post feature by validating user login and creating a unique like relationship between user and post in Neo4j, then redirect to the referer page.
Implement log out by sending a get request to /logout, removing the username key from the session, and redirecting to the home page so templates reflect a logged-out state.
Build the profile page in Flask and Neo4j by parsing the username from the url, rendering the profile with the username, and displaying the user's most recent posts.
Discover how to recommend similar users to the logged-in user by matching posts tagged with the same tags, via a cipher query and profile display.
Show how two users share commonality on a profile page by counting liked posts and shared tags when viewing another user's profile.
Explore how to implement a time tree in Neo4j to attach posts to day nodes, enabling year, month, and day aggregations with a calendar-backed structure.
Finish learning the time tree approach by querying posts by year, month, or day and counting posts within periods using time properties and aggregates.
Deploy your Flask app to Heroku by creating a proc file and a requirements.txt, using the Heroku port from the port environment variable, and disabling debug mode.
Deploy to Heroku by pushing code, configuring graphene db add-on, and using an environment variable for the database URL. Confirm cloud deployment and test with a live app URL.
Wrap up: migrate a sequel-based project to Neo4j, store data as a graph, and use Cypher to deliver real-time recommendations and social features for your web app.
In this Building Web Apps Using Flask and Neo4j training course, expert author Nicole White will teach you how to incorporate graph databases into your web applications. This course is designed for the absolute beginner, meaning no previous experience with Flask or Neo4j is required.
You will start by learning how to install Neo4j and set up your project. From there, Nicole will teach you the basics of Neo4j, Flask, and Py2neo. She will then walk you through building a microblogging application from scratch, where you will learn how to register and login users, add posts, and display posts. This video tutorial also covers social recommendations, including recommending similar users and commonalities between two users. Finally, you will learn about scaling considerations and how to deploy your project to Heroku.
Once you have completed this computer based training course, you will have learned how to incorporate Neo4j into your own web applications. Working files are included, allowing you to follow along with the author throughout the lessons.