• Stars
    star
    368
  • Rank 115,483 (Top 3 %)
  • Language
    Python
  • Created about 8 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Neo4j Movies Example application with Flask backend using the neo4j-python-driver

Neo4j Movies Application: Quick Start

CI sync example CI async example

movie application

This example application demonstrates how easy it is to get started with Neo4j in Python.

It is a very simple web application that uses our Movie graph dataset to provide a search with listing, a detail view and a graph visualization.

We offer two different ways to run the application: synchronous and asynchronous (using asyncio).

The Stack

These are the components of our Web Application:

  • Application Type: Python-Web Application

  • Web framework:

    • sync: Flask (Micro-Webframework)

    • async: FastAPI (Micro-Webframework)

  • Neo4j Database Connector: Neo4j Python Driver for Cypher Docs

  • Database: Neo4j-Server (4.4 or newer) with multi-database

  • Frontend: jquery, bootstrap, d3.js

Provision a database quickly with Neo4j Sandbox or Neo4j Aura.

Setup

Install Python 3.7-3.11.

Then get yourself set up with virtualenv so we don’t break any other Python stuff you have on your machine. After you’ve got that installed let’s set up an environment for our app:

virtualenv neo4j-movies
source neo4j-movies/bin/activate

The next step is to install the dependencies for the app with pip (or pip3 for python3):

sync:

pip install -r requirements-sync.txt

async:

pip install -r requirements-async.txt

Run locally

And finally let’s start up a web server:

sync:

python movies_sync.py
# or python3 movies_sync.py

Running on http://127.0.0.1:8080/

async:

python movies_async.py
# or python3 movies_async.py

Running on http://127.0.0.1:8080/

Navigate to http://localhost:8080 and you should see your first Neo4j application

Changing the Database

By default, this example application connects to a remote Neo4j database run by Neo4j for this purpose. If you want to connect to a local database, follow these instructions.

Start your local Neo4j Server (Download & Install), open the Neo4j Browser. Then install the Movies data set with :play movies, click the CREATE statement (in some versions, this will not be directly on the first page of the movies example), and hit the triangular "Run" button.

If you haven’t touched the configuration of your Neo4j Server, the database will be reachable at neo4j://localhost:7687.

Use environment variables to let the application know where to connect to the database.

sync:

NEO4J_URI=neo4j://localhost:7687 NEO4J_DATABASE=neo4j NEO4J_USER="<username>" NEO4J_PASSWORD="<password>" python movies_sync.py

Running on http://127.0.0.1:8080/

async:

NEO4J_URI=neo4j://localhost:7687 NEO4J_DATABASE=neo4j NEO4J_USER="<username>" NEO4J_PASSWORD="<password>" python movies_async.py

Running on http://127.0.0.1:8080/

All Configuration Options

Here are all environment variables that can be used to configure the application.

Environment Variable Name Default Value (or N/A)

PORT

8080

NEO4J_URI

neo4j+s://demo.neo4jlabs.com

NEO4J_USER

movies

NEO4J_PASSWORD

movies

NEO4J_DATABASE

movies

More Repositories

1

movies-java-spring-data-neo4j

Neo4j Movies Example with Spring Data Neo4j
Java
537
star
2

neo4j-movies-template

A Neo4j movies React application with backends in Python/Flask and Node/Express.
JavaScript
301
star
3

movies-javascript-bolt

Neo4j Movies Example with webpack-in-browser app using the neo4j-javascript-driver
JavaScript
175
star
4

movies-java-bolt

Neo4j Movies Example application with SparkJava backend using the neo4j-java-driver
Java
89
star
5

paradise-papers-django

A simple Django web app for searching the Paradise Papers dataset backed by Neo4j
Python
74
star
6

rag-demo

Python
69
star
7

sdn-university

HTML
67
star
8

discoveraurafree

A repo with examples from the Discover Neo4j AuraDB Free Live Stream
Cypher
56
star
9

neo4j-ogm-university

Example Project for Neo4j OGM
JavaScript
52
star
10

movies-dotnet-neo4jclient

Neo4j Movies Demo App in dotnet with neo4jclient
C#
51
star
11

movies-python-py2neo

Neo4j Example Application with backend in py2neo
Python
48
star
12

game-of-thrones

Neo4j Database of A Song of Ice and Fire - Game of Thrones
47
star
13

twitter-graph-viz

OSCON Twitter Graph. Loads tweets from Twitter API mentioning OSCON or Neo4j into a Neo4j Graph Database for analysis.
JavaScript
45
star
14

movies-python-py2neo-2.0

Py2Neo 2 Implementation of the Movies Example Demo Application
Python
44
star
15

nestjs-neo4j-realworld-example

A Neo4j, Typescript and Nest.js clone of the Realworld.io App
TypeScript
44
star
16

graphgists

Reference Graph Gists
Shell
43
star
17

movies-dotnetcore-bolt

C#
40
star
18

sdn-cineasts

Java
37
star
19

movies-dotnet-bolt

C#
35
star
20

health-graph

Graph of health and pharm data.
Python
32
star
21

supply-chain-demo

Neo4j Supply Chain Demo
C#
31
star
22

movies-java-spring-boot-jdbc

Neo4j Movies Demo App in java with spring-boot-jdbc
HTML
27
star
23

nlp-knowledge-graph

This repository contains queries and data from creating a dev.to/Wikidata Software Knowledge Graph using neosemantics and APOC NLP.
Shell
24
star
24

movies-kotlin-spring-data-neo4j

Neo4j Movies Example with Kotlin, Spring Boot & Spring Data Neo4j
Kotlin
24
star
25

neo4j-movies-python-neomodel

Example Movie app for Neo4j and Django
Python
22
star
26

golang-neo4j-realworld-example

Go
22
star
27

movies-golang-bolt

Neo4j Movies Example application with built-in HTTP server using the neo4j-go-driver
Go
22
star
28

nodejs-neo4j-realworld-example

A Neo4j and Node.js clone of the Realworld.io App
JavaScript
22
star
29

movies-java-jdbc

Neo4j Movies Demo App in java with jdbc
HTML
21
star
30

movies-java-spring-data-neo4j-3

Neo4j Movies Demo App in java with spring-data-neo4j
HTML
21
star
31

movies-go-cq

Neo4j Movies Demo App in go with cq
HTML
21
star
32

spring-data-neo4j-intro-app

Java
18
star
33

movies-python-neo4jrestclient

Neo4j Movies Demo App with neo4jrestclient
HTML
18
star
34

sec-edgar-notebooks

Active WIP for experimenting with GraphRAG and Knowledge Graphs
Jupyter Notebook
17
star
35

neo4j-stackoverflow-import

Utilities for Importing Stack-Exchange Dumps into Neo4j
Java
15
star
36

movies-clojure-neocons

Neo4j Movies Demo App in clojure with neocons
HTML
14
star
37

link-prediction

This repository contains both Jupyter notebooks for solving a link prediction problem using Neo4j’s Graph Data Science Library and scikit-learn.
Jupyter Notebook
14
star
38

kettle-plugin-examples

Simple examples for the Neo4j Kettle (Pentaho Data Integration) steps.
Roff
14
star
39

cybersecurity-demo

Neo4j Cybersecurity Demo
14
star
40

neo4j-grouping

Graph Grouping using APOC based on Gradoop Demo
JavaScript
14
star
41

slack-neo4j

Neo4j Slack Integration Demo
Python
13
star
42

movies-graphql-javascript

Neo4j example movie search application with GraphQL backend
JavaScript
13
star
43

asset_portal

Asset management portal written with Ruby on Rails and Neo4j
JavaScript
13
star
44

movies-symfony-php-bolt

Neo4j Movies Example Project in Symfony
PHP
12
star
45

cineasts-spring-data-neo4j-3

Spring Data Neo4j 3 Cineasts Tutorial Example
Java
12
star
46

neo4j-twitter-stream

Example Application to consume a twitter stream with Neo4j
Java
12
star
47

graph-embeddings

Jupyter Notebook
11
star
48

movies-php-client

Cypher
9
star
49

movies-ruby-neo4jrb

Neo4j Movies Demo App in ruby with neo4jrb
HTML
9
star
50

movies-java-server-extension

Neo4j Movies Demo App in java with server-extension
HTML
9
star
51

atomist-spring-neo4j

Example Project demonstrating Atomist Editors for Spring Boot with Neo4j
Java
8
star
52

movies-php-neoclient

Neo4j Movies Demo App in php with neoclient
HTML
8
star
53

cytoscape-graph-viz-lotr

Cytoscape Graph Visualization Demo Lord of the Rings (LOTR)
JavaScript
7
star
54

neo4j-fabric-examples

Set of resources for the real time detection of fraud with Neo4j Fabric across shards, use case transaction structuring aka smurfing
Jupyter Notebook
6
star
55

neo4j-spatial-template

Simple Maven Setup for Neo4j Spatial
Java
6
star
56

movies-javascript-node-neo4j

Neo4j Movies Demo App in javascript with node-neo4j
6
star
57

neo4j-foodmart-dataset

Neo4j Food Mart dataset
5
star
58

neo4j-graph-datasets

Imports and visualizations of different public datasets into Neo4j
HTML
5
star
59

movies-php-neo4jphp

Neo4j Movies Demo App in php with neo4jphp
HTML
5
star
60

ruby_code_analytics

A Rails application for browsing Ruby code's execution, AST, and object space
Ruby
5
star
61

movies-ruby-neo4j-core

Neo4j Movies Demo App in ruby with neo4j-core
HTML
5
star
62

graph_starter

Ruby Rails engine gem to provide automatic UI for an asset portal
JavaScript
4
star
63

sdn-migration

Java
3
star
64

movies-python-py2neo-1.6

Neo4j Movies Demo App in python with py2neo-1.6
Python
3
star
65

conf-graph

The conference graph!
Jupyter Notebook
3
star
66

neo4j-example-graph-datasets

Useful Datasets to import/use in Neo4j with Load and Use instructions
2
star
67

oscon-graph

DIY Neo4j Graph from the OSCON 2014 event data feed
Shell
2
star
68

friends-php-client

PHP
2
star
69

graphgist_portal

New GraphGist portal written in Rails and using GraphStarter
CSS
2
star
70

aws-lambda-java-neo4j

Connect to Neo4j using AWS Lambda with Java
Java
2
star
71

movies-rstats-neo4r

Example Project for R using neo4r
HTML
2
star
72

php-laravel-neo4j-realworld-example

PHP
1
star
73

movies-perl-neo4p

Neo4j Movies Demo App in perl with neo4p
Perl
1
star
74

elastic-example

1
star
75

neo4jXtestcontainers

Example repository for the Neo4j X Testcontainers livestream on Thursday, 2023-11-02.
Java
1
star