GithubHelp home page GithubHelp logo

saqib-nadeem / python-flask-neo4j-heroku-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from carsonmcdonald/python-flask-neo4j-heroku-example

0.0 2.0 0.0 680 KB

Example of using Python, Flask and neo4j on Heroku

License: MIT License

Python 11.28% CSS 1.25% JavaScript 87.47%

python-flask-neo4j-heroku-example's Introduction

Python + Flask + neo4j on Heroku Example

I put this project together as an entry for the Heroku neo4j challenge and it should be fairly easy to get a feel for how to integrate neo4j into an app of your own or use as a base for a new app. Check out the demo app to see it in action.

The app is a simple data explorer with bookmarking ability to show off some of the features of neo4j. A subset of data from a Stack Exchange CC data dump, specifically Programers Stack Exchange, is used to populate a sample database. The bookmarking feature allows for weights to be added for later use in recomendations.

For more details about the the app check out the wiki page.

I'm using the following stack on the server side:

  • Python
  • Flask web microframework
  • neo4j graph database
  • py2neo neo4j python library

I'm using the following stack on the client side:

If you find this code helpful take a minute and rate it on Gensen. If you want to use this code as a base for another project take a look at the comments labeled "neo4j note" for hints on what might be most useful.

Deploying Localy

There are a few requirements for the app to run:

After verifing that requirements are ready the following should get things running:

git clone [email protected]:carsonmcdonald/Python-Flask-neo4j-Heroku-Example.git
cd Python-Flask-neo4j-Heroku-Example
virtualenv venv --distribute
source venv/bin/activate
pip install -r requirements.txt
# The following command will take a while to run but will produce output as it does
python load.py
# Once the load is complete the app is ready to run
python app.py 

You can also use Foreman to run locally.

Heroku Deployment

git clone [email protected]:carsonmcdonald/Python-Flask-neo4j-Heroku-Example.git
cd Python-Flask-neo4j-Heroku-Example
virtualenv venv --distribute
source venv/bin/activate
pip install -r requirements.txt
heroku create --stack cedar
heroku addons:add neo4j
heroku scale web=0
git push heroku master
# This next step will take a while, maybe 30 minutes monitor it with the "heroku logs" command
heroku run:detached python load.py 
# Once the load has completed
heroku scale web=1

See the Heroku Python howto for more information.

License

See the LICENSE file.

python-flask-neo4j-heroku-example's People

Contributors

carsonmcdonald avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.